diff options
author | Gordon Sim <gsim@apache.org> | 2006-12-05 13:14:38 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2006-12-05 13:14:38 +0000 |
commit | 0c3d1cba3cbb8c5656bb2fbc8de393a5801fabdb (patch) | |
tree | 05cdf5b65d52e796e4ce5570aa07129bf69b2ca0 /qpid/cpp/lib/broker/BrokerQueue.h | |
parent | 25e43ff200982d174632fda44a7f20240e758250 (diff) | |
download | qpid-python-0c3d1cba3cbb8c5656bb2fbc8de393a5801fabdb.tar.gz |
Added queue policy class for controlling when message content should be released from memory.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@482639 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/broker/BrokerQueue.h')
-rw-r--r-- | qpid/cpp/lib/broker/BrokerQueue.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qpid/cpp/lib/broker/BrokerQueue.h b/qpid/cpp/lib/broker/BrokerQueue.h index 13f4bf2de0..18befbee03 100644 --- a/qpid/cpp/lib/broker/BrokerQueue.h +++ b/qpid/cpp/lib/broker/BrokerQueue.h @@ -22,6 +22,7 @@ #define _Queue_ #include <vector> +#include <memory> #include <queue> #include <boost/shared_ptr.hpp> #include <amqp_types.h> @@ -29,7 +30,9 @@ #include <ConnectionToken.h> #include <Consumer.h> #include <BrokerMessage.h> +#include <FieldTable.h> #include <sys/Monitor.h> +#include <QueuePolicy.h> namespace qpid { namespace broker { @@ -41,6 +44,7 @@ namespace qpid { struct ExclusiveAccessException{}; using std::string; + /** * The brokers representation of an amqp queue. Messages are * delivered to a queue from where they can be dispatched to @@ -62,9 +66,13 @@ namespace qpid { int64_t lastUsed; Consumer* exclusive; mutable u_int64_t persistenceId; + std::auto_ptr<QueuePolicy> policy; + void pop(); + void push(Message::shared_ptr& msg); bool startDispatching(); bool dispatch(Message::shared_ptr& msg); + void setPolicy(std::auto_ptr<QueuePolicy> policy); public: @@ -77,7 +85,7 @@ namespace qpid { const ConnectionToken* const owner = 0); ~Queue(); - void create(); + void create(const qpid::framing::FieldTable& settings); void destroy(); /** * Informs the queue of a binding that should be cancelled on |