summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cluster.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-02-04 17:04:45 +0000
committerAlan Conway <aconway@apache.org>2009-02-04 17:04:45 +0000
commit314eb1b65a752daaa80a2cb5174bac78c4643bcb (patch)
treea8fcbb5f9cc7d5af1cd5016f253c98296fa9f3bb /cpp/src/qpid/cluster/Cluster.h
parent80c1c1da2855cc0c03d08a0fcb425c38b3344333 (diff)
downloadqpid-python-314eb1b65a752daaa80a2cb5174bac78c4643bcb.tar.gz
Cluster sets recovery flag on Broker for first member in cluster.
Disable recovery from local store if the recovery flag is not set. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740793 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.h')
-rw-r--r--cpp/src/qpid/cluster/Cluster.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.h b/cpp/src/qpid/cluster/Cluster.h
index 1cfcd04c6f..f7955aa743 100644
--- a/cpp/src/qpid/cluster/Cluster.h
+++ b/cpp/src/qpid/cluster/Cluster.h
@@ -64,15 +64,17 @@ class Cluster : private Cpg::Handler, public management::Manageable {
public:
typedef boost::intrusive_ptr<Connection> ConnectionPtr;
typedef std::vector<ConnectionPtr> Connections;
-
- /**
- * Join a cluster.
- */
+
+ /** Construct the cluster in plugin earlyInitialize */
Cluster(const std::string& name, const Url& url, broker::Broker&, bool useQuorum,
size_t readMax, size_t writeEstimate);
virtual ~Cluster();
+ /** Join the cluster in plugin initialize. Requires transport
+ * plugins to be available.. */
+ void initialize();
+
// Connection map - called in connection threads.
void addLocalConnection(const ConnectionPtr&);
void addShadowConnection(const ConnectionPtr&);
@@ -177,7 +179,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
boost::shared_ptr<sys::Poller> poller;
Cpg cpg;
const std::string name;
- const Url myUrl;
+ Url myUrl;
const MemberId myId;
const size_t readMax;
const size_t writeEstimate;
@@ -197,7 +199,10 @@ class Cluster : private Cpg::Handler, public management::Manageable {
// Called only from event delivery thread
Decoder decoder;
-
+
+ // Used only during initialization
+ bool initialized;
+
// Remaining members are protected by lock
mutable sys::Monitor lock;