summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/QueueRegistry.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-03-09 15:58:17 +0000
committerGordon Sim <gsim@apache.org>2009-03-09 15:58:17 +0000
commit1214783620f81f2b0b1e69c4c4df874d58cdf85b (patch)
tree354f0767a8b113278cb3d5f8208ee8769fe56bac /cpp/src/qpid/broker/QueueRegistry.cpp
parent8f0e57d62c16d4723e6202127490ec12473e24d0 (diff)
downloadqpid-python-1214783620f81f2b0b1e69c4c4df874d58cdf85b.tar.gz
QPID-1721: Fixes for replication between clusters when new members are added
* suppress event generation during node catch up * ensure sequence counters used for duplicate detection are synchronised in both primary and dr clusters when new members join * connect queue with the event manager within queue registry rather than adapter as the latter path is not used for catchup git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@751719 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/QueueRegistry.cpp')
-rw-r--r--cpp/src/qpid/broker/QueueRegistry.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/QueueRegistry.cpp b/cpp/src/qpid/broker/QueueRegistry.cpp
index 2cb801bf83..d079e543c4 100644
--- a/cpp/src/qpid/broker/QueueRegistry.cpp
+++ b/cpp/src/qpid/broker/QueueRegistry.cpp
@@ -19,6 +19,7 @@
*
*/
#include "QueueRegistry.h"
+#include "QueueEvents.h"
#include "qpid/log/Statement.h"
#include <sstream>
#include <assert.h>
@@ -27,7 +28,7 @@ using namespace qpid::broker;
using namespace qpid::sys;
QueueRegistry::QueueRegistry() :
- counter(1), store(0), parent(0), lastNode(false) {}
+ counter(1), store(0), events(0), parent(0), lastNode(false) {}
QueueRegistry::~QueueRegistry(){}
@@ -43,7 +44,8 @@ QueueRegistry::declare(const string& declareName, bool durable,
if (i == queues.end()) {
Queue::shared_ptr queue(new Queue(name, autoDelete, durable ? store : 0, owner, parent));
queues[name] = queue;
- if (lastNode) queue->setLastNodeFailure();
+ if (lastNode) queue->setLastNodeFailure();
+ if (events) queue->setQueueEventManager(*events);
return std::pair<Queue::shared_ptr, bool>(queue, true);
} else {
@@ -105,3 +107,7 @@ void QueueRegistry::updateQueueClusterState(bool _lastNode)
lastNode = _lastNode;
}
+void QueueRegistry::setQueueEvents(QueueEvents* e)
+{
+ events = e;
+}