Author: astitcher Date: Thu Jun 11 14:24:05 2009 New Revision: 783789 URL: http://svn.apache.org/viewvc?rev=783789&view=rev Log: Add flag to broker Connection so that it knows if it is a local or shadow connection
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=783789&r1=783788&r2=783789&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Thu Jun 11 14:24:05 2009 @@ -58,7 +58,8 @@ links(broker_.getLinks()), agent(0), timer(broker_.getTimer()), - errorListener(0) + errorListener(0), + shadow(false) { Manageable* parent = broker.GetVhostObject(); Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h?rev=783789&r1=783788&r2=783789&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h Thu Jun 11 14:24:05 2009 @@ -129,6 +129,11 @@ void sendClose(); void setSecureConnection(SecureConnection* secured); + /** True if this is a shadow connection in a cluster. */ + bool isShadow() { return shadow; } + /** Called by cluster to mark shadow connections */ + void setShadow() { shadow = true; } + private: typedef boost::ptr_map<framing::ChannelId, SessionHandler> ChannelMap; typedef std::vector<Queue::shared_ptr>::iterator queue_iterator; @@ -147,6 +152,7 @@ boost::intrusive_ptr<TimerTask> heartbeatTimer; boost::intrusive_ptr<TimerTask> timeoutTimer; ErrorListener* errorListener; + bool shadow; public: qmf::org::apache::qpid::broker::Connection* getMgmtObject() { return mgmtObject; } Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp?rev=783789&r1=783788&r2=783789&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/cluster/Connection.cpp Thu Jun 11 14:24:05 2009 @@ -94,6 +94,7 @@ else { // Shadow or catch-up connection connection.setClusterOrderOutput(nullFrameHandler); // Passive, discard cluster-order frames connection.setClientThrottling(false); // Disable client throttling, done by active node. + connection.setShadow(); // Mark the broker connection as a shadow. } if (!isCatchUp()) connection.setErrorListener(this); --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org