summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2011-09-30 20:55:48 +0000
committerAlan Conway <aconway@apache.org>2011-09-30 20:55:48 +0000
commitc3716ef1008e7aceab1071ea0b6510321d2421f5 (patch)
tree3c7d42576f682c6442ff9e16c043d100b543fec3
parentd0a7182866f7ea9a684a55b540814ce687a0fc41 (diff)
downloadqpid-python-c3716ef1008e7aceab1071ea0b6510321d2421f5.tar.gz
QPID-2920: Remove unused QueueHandler member from BrokerContext.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-2920-active@1177830 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp8
-rw-r--r--qpid/cpp/src/qpid/cluster/exp/BrokerContext.h4
-rw-r--r--qpid/cpp/src/qpid/cluster/exp/Core.cpp2
3 files changed, 6 insertions, 8 deletions
diff --git a/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp b/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp
index fd21ccf79c..484b64f25d 100644
--- a/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp
+++ b/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp
@@ -22,7 +22,6 @@
#include "Core.h"
#include "BrokerContext.h"
#include "QueueContext.h"
-#include "QueueHandler.h"
#include "Multicaster.h"
#include "hash.h"
#include "qpid/framing/ClusterMessageEnqueueBody.h"
@@ -81,8 +80,7 @@ BrokerContext::ScopedSuppressReplication::~ScopedSuppressReplication() {
tssReplicate = true;
}
-BrokerContext::BrokerContext(Core& c, boost::intrusive_ptr<QueueHandler> q)
- : core(c), queueHandler(q) {}
+BrokerContext::BrokerContext(Core& c) : core(c) {}
BrokerContext::~BrokerContext() {}
@@ -104,8 +102,10 @@ void BrokerContext::routing(const boost::intrusive_ptr<broker::Message>&) {}
void BrokerContext::routed(const boost::intrusive_ptr<Message>&) {}
void BrokerContext::acquire(const broker::QueuedMessage& qm) {
- if (tssReplicate)
+ if (tssReplicate) {
+ assert(!qm.queue->isConsumingStopped());
mcaster(qm).mcast(ClusterMessageAcquireBody(pv, qm.queue->getName(), qm.position));
+ }
}
void BrokerContext::dequeue(const broker::QueuedMessage& qm) {
diff --git a/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h b/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h
index 6ac5f4ed0a..825a975292 100644
--- a/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h
+++ b/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h
@@ -28,7 +28,6 @@
namespace qpid {
namespace cluster {
class Core;
-class QueueHandler;
class QueueContext;
// TODO aconway 2010-10-19: experimental cluster code.
@@ -47,7 +46,7 @@ class BrokerContext : public broker::Cluster
~ScopedSuppressReplication();
};
- BrokerContext(Core&, boost::intrusive_ptr<QueueHandler>);
+ BrokerContext(Core&);
~BrokerContext();
// Messages
@@ -86,7 +85,6 @@ class BrokerContext : public broker::Cluster
Multicaster& mcaster(const std::string&);
Core& core;
- boost::intrusive_ptr<QueueHandler> queueHandler;
};
}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/exp/Core.cpp b/qpid/cpp/src/qpid/cluster/exp/Core.cpp
index 53a4169041..a55986decb 100644
--- a/qpid/cpp/src/qpid/cluster/exp/Core.cpp
+++ b/qpid/cpp/src/qpid/cluster/exp/Core.cpp
@@ -56,7 +56,7 @@ Core::Core(const Settings& s, broker::Broker& b) :
groups[i]->getEventHandler().add(boost::intrusive_ptr<HandlerBase>(
new MessageHandler(groups[i]->getEventHandler(), *this)));
- std::auto_ptr<BrokerContext> bh(new BrokerContext(*this, queueHandler));
+ std::auto_ptr<BrokerContext> bh(new BrokerContext(*this));
brokerHandler = bh.get();
// BrokerContext belongs to Broker
broker.setCluster(std::auto_ptr<broker::Cluster>(bh));