diff options
Diffstat (limited to 'qpid/cpp/src/qpid/broker/Queue.h')
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h index 1588ae1171..0ba7b362e9 100644 --- a/qpid/cpp/src/qpid/broker/Queue.h +++ b/qpid/cpp/src/qpid/broker/Queue.h @@ -21,6 +21,7 @@ * under the License. * */ +#include "qpid/log/Statement.h" // FIXME XXX aconway 2011-06-08: remove #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/OwnershipToken.h" @@ -130,8 +131,9 @@ class Queue : public boost::enable_shared_from_this<Queue>, UsageBarrier barrier; int autoDeleteTimeout; boost::intrusive_ptr<qpid::sys::TimerTask> autoDeleteTask; - // Allow dispatching consumer threads to be stopped. - sys::Stoppable dispatching; + // Allow dispatching consumer threads to be stopped. Used by cluster + sys::Stoppable dispatching; // FIXME aconway 2011-06-07: name: acquiring? + boost::intrusive_ptr<RefCounted> clusterContext; void push(boost::intrusive_ptr<Message>& msg, bool isRecovery=false); void setPolicy(std::auto_ptr<QueuePolicy> policy); @@ -179,6 +181,7 @@ class Queue : public boost::enable_shared_from_this<Queue>, void checkNotDeleted(); void notifyDeleted(); + void acquireStopped(); public: @@ -379,20 +382,25 @@ class Queue : public boost::enable_shared_from_this<Queue>, void flush(); - const Broker* getBroker(); + Broker* getBroker(); - /** Stop consumers. Return when all consumer threads are stopped. - *@pre Queue is active and not already stopping. - */ + /** Stop consumers. Return when all consumer threads are stopped. */ void stop(); - /** Start consumers. - *@pre Queue is stopped and idle: no thread in dispatch. - */ + /** Start consumers. */ void start(); - /** Context data attached and used by cluster code. */ - boost::intrusive_ptr<qpid::RefCounted> clusterContext; + /** Context information used in a cluster. */ + boost::intrusive_ptr<RefCounted> getClusterContext() { + // FIXME aconway 2011-06-08: XXX + QPID_LOG(critical, "FIXME q get context " << name << clusterContext); + return clusterContext; + } + void setClusterContext(boost::intrusive_ptr<RefCounted> context) { + // FIXME aconway 2011-06-08: XXX + clusterContext = context; + QPID_LOG(critical, "FIXME q set context " << name << clusterContext); + } }; }} // qpid::broker |