diff options
Diffstat (limited to 'cpp/src/qpid')
| -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; |
