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 | 46fb2ad9fbc3694e2a321417ecd839badd7b106e (patch) | |
tree | dde3c1f64dedb99402f69e34b02d1ba875c962aa /cpp/lib/broker/BrokerQueue.h | |
parent | 7107d5c1c3c8323d832184fc097a5d9223633d32 (diff) | |
download | qpid-python-46fb2ad9fbc3694e2a321417ecd839badd7b106e.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/qpid@482639 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/broker/BrokerQueue.h')
-rw-r--r-- | cpp/lib/broker/BrokerQueue.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/lib/broker/BrokerQueue.h b/cpp/lib/broker/BrokerQueue.h index 13f4bf2de0..18befbee03 100644 --- a/cpp/lib/broker/BrokerQueue.h +++ b/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 |