diff options
| author | Alan Conway <aconway@apache.org> | 2009-02-25 22:53:43 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-02-25 22:53:43 +0000 |
| commit | d626716ccce8244e6b565c3acc176eb69a472cf6 (patch) | |
| tree | eb9cc87b76a24a9b40f82ce0c6e13306db06d932 /cpp/src/qpid/cluster | |
| parent | d757e87fc81292c173ee98eece3dbd059d06902b (diff) | |
| download | qpid-python-d626716ccce8244e6b565c3acc176eb69a472cf6.tar.gz | |
Add FrameDecoder unit test, update comments in Cluster.h/cpp.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@747947 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster')
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index 7285b85991..6b4cd0256c 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -104,12 +104,12 @@ Cluster::Cluster(const ClusterSettings& set, broker::Broker& b) : boost::bind(&Cluster::leave, this), "Error delivering frames", poller), - connections(*this), decoder(boost::bind(&PollableFrameQueue::push, &deliverFrameQueue, _1), connections), expiryPolicy(new ExpiryPolicy(boost::bind(&Cluster::isLeader, this), mcast, myId, broker.getTimer())), frameId(0), initialized(false), state(INIT), + connections(*this), lastSize(0), lastBroker(false), sequence(0) @@ -161,7 +161,7 @@ void Cluster::addShadowConnection(const boost::intrusive_ptr<Connection>& c) { } void Cluster::erase(const ConnectionId& id) { - // Called only by Connection::deliverClose in deliver thread, no need to lock. + // Called only by Connection::deliverClose in deliver thread with lock held. connections.erase(id); } diff --git a/cpp/src/qpid/cluster/Cluster.h b/cpp/src/qpid/cluster/Cluster.h index 8c5eb06ff7..e3e259dac4 100644 --- a/cpp/src/qpid/cluster/Cluster.h +++ b/cpp/src/qpid/cluster/Cluster.h @@ -196,12 +196,13 @@ class Cluster : private Cpg::Handler, public management::Manageable { PollerDispatch dispatcher; PollableEventQueue deliverEventQueue; PollableFrameQueue deliverFrameQueue; - ConnectionMap connections; boost::shared_ptr<FailoverExchange> failoverExchange; Quorum quorum; - // Used only in delivery thread + // Used only in deliverdEvent thread Decoder decoder; + + // Used only in deliveredFrame thread ClusterMap::Set elders; boost::intrusive_ptr<ExpiryPolicy> expiryPolicy; uint64_t frameId; @@ -223,6 +224,8 @@ class Cluster : private Cpg::Handler, public management::Manageable { UPDATER, ///< Offer accepted, sending a state update. LEFT ///< Final state, left the cluster. } state; + + ConnectionMap connections; ClusterMap map; size_t lastSize; bool lastBroker; |
