summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/ClusterPlugin.cpp
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/ClusterPlugin.cpp
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/ClusterPlugin.cpp')
-rw-r--r--cpp/src/qpid/cluster/ClusterPlugin.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp
index 1c15747c77..7e0bdcbea8 100644
--- a/cpp/src/qpid/cluster/ClusterPlugin.cpp
+++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp
@@ -136,13 +136,13 @@ struct ClusterPlugin : public Plugin {
Options* getOptions() { return &options; }
- void initialize(Plugin::Target& target) {
+ void earlyInitialize(Plugin::Target& target) {
if (values.name.empty()) return; // Only if --cluster-name option was specified.
Broker* broker = dynamic_cast<Broker*>(&target);
if (!broker) return;
cluster = new Cluster(
values.name,
- values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)),
+ values.url.empty() ? Url() : Url(values.url),
*broker,
values.quorum,
values.readMax, values.writeEstimate*1024
@@ -158,7 +158,9 @@ struct ClusterPlugin : public Plugin {
}
}
- void earlyInitialize(Plugin::Target&) {}
+ void initialize(Plugin::Target& ) {
+ cluster->initialize();
+ }
};
static ClusterPlugin instance; // Static initialization.