From f2d0f0cfbfebb082e92f28b8d1b2987a0f20acf6 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 6 Dec 2006 17:51:42 +0000 Subject: Allow non-durable messages to be lazy-loaded. Cleanup of lazy-loaded messages that are never enqueued. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@483165 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/MessageStore.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cpp/lib/broker/MessageStore.h') diff --git a/cpp/lib/broker/MessageStore.h b/cpp/lib/broker/MessageStore.h index be9172e383..acbff82c35 100644 --- a/cpp/lib/broker/MessageStore.h +++ b/cpp/lib/broker/MessageStore.h @@ -39,7 +39,9 @@ namespace qpid { u_int64_t stagingThreshold; }; /** - * An abstraction of the persistent storage for messages. + * An abstraction of the persistent storage for messages. (In + * all methods, any pointers/references to queues or messages + * are valid only for the duration of the call). */ class MessageStore : public TransactionalStore{ public: @@ -66,7 +68,7 @@ namespace qpid { * persistence id will be set on the message which can be * used to load the content or to append to it. */ - virtual void stage(Message::shared_ptr& msg) = 0; + virtual void stage(Message* const msg) = 0; /** * Destroys a previously staged message. This only needs @@ -74,7 +76,7 @@ namespace qpid { * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ - virtual void destroy(Message::shared_ptr& msg) = 0; + virtual void destroy(Message* const msg) = 0; /** * Appends content to a previously staged message @@ -102,7 +104,7 @@ namespace qpid { * distributed transaction in which the operation takes * place or null for 'local' transactions */ - virtual void enqueue(TransactionContext* ctxt, Message::shared_ptr& msg, const Queue& queue, const std::string * const xid) = 0; + virtual void enqueue(TransactionContext* ctxt, Message* const msg, const Queue& queue, const std::string * const xid) = 0; /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message @@ -114,7 +116,7 @@ namespace qpid { * distributed transaction in which the operation takes * place or null for 'local' transactions */ - virtual void dequeue(TransactionContext* ctxt, Message::shared_ptr& msg, const Queue& queue, const std::string * const xid) = 0; + virtual void dequeue(TransactionContext* ctxt, Message* const msg, const Queue& queue, const std::string * const xid) = 0; /** * Treat all enqueue/dequeues where this xid was specified as being committed. */ -- cgit v1.2.1