diff options
author | Gordon Sim <gsim@apache.org> | 2007-03-30 15:50:07 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-03-30 15:50:07 +0000 |
commit | 72bca07ee53fb9476f268133f244d55d8f53d3b9 (patch) | |
tree | 6e8400200b22188899144a025ecb1a6c5922cc7b /qpid/cpp/lib/broker/NullMessageStore.h | |
parent | 61c7761f005dacfc5938a4d4d25b7120a8e21620 (diff) | |
download | qpid-python-72bca07ee53fb9476f268133f244d55d8f53d3b9.tar.gz |
Refactored the MessageStore interface to restrict visibility of broker core from store implementations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@524139 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/broker/NullMessageStore.h')
-rw-r--r-- | qpid/cpp/lib/broker/NullMessageStore.h | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/qpid/cpp/lib/broker/NullMessageStore.h b/qpid/cpp/lib/broker/NullMessageStore.h index 705f18ab43..f1a321cff4 100644 --- a/qpid/cpp/lib/broker/NullMessageStore.h +++ b/qpid/cpp/lib/broker/NullMessageStore.h @@ -26,33 +26,38 @@ #include <BrokerQueue.h> namespace qpid { - namespace broker { - - /** - * A null implementation of the MessageStore interface - */ - class NullMessageStore : public MessageStore{ - const bool warn; - public: - NullMessageStore(bool warn = false); - virtual void create(const Queue& queue, const qpid::framing::FieldTable& settings); - virtual void destroy(const Queue& queue); - virtual void recover(RecoveryManager& queues, const MessageStoreSettings* const settings = 0); - virtual void stage(Message* const msg); - virtual void destroy(Message* const msg); - virtual void appendContent(Message* const msg, const std::string& data); - virtual void loadContent(Message* const msg, std::string& data, uint64_t offset, uint32_t length); - virtual void enqueue(TransactionContext* ctxt, Message* const msg, const Queue& queue, const string * const xid); - virtual void dequeue(TransactionContext* ctxt, Message* const msg, const Queue& queue, const string * const xid); - virtual void prepared(const std::string * const xid); - virtual void committed(const std::string * const xid); - virtual void aborted(const std::string * const xid); - virtual std::auto_ptr<TransactionContext> begin(); - virtual void commit(TransactionContext* ctxt); - virtual void abort(TransactionContext* ctxt); - ~NullMessageStore(){} - }; - } +namespace broker { + +/** + * A null implementation of the MessageStore interface + */ +class NullMessageStore : public MessageStore +{ + const bool warn; +public: + NullMessageStore(bool warn = false); + + virtual std::auto_ptr<TransactionContext> begin(); + virtual std::auto_ptr<TPCTransactionContext> begin(const std::string& xid); + virtual void prepare(TPCTransactionContext& txn); + virtual void commit(TransactionContext& txn); + virtual void abort(TransactionContext& txn); + + virtual void create(const PersistableQueue& queue); + virtual void destroy(const PersistableQueue& queue); + virtual void create(const PersistableExchange& exchange); + virtual void destroy(const PersistableExchange& exchange); + virtual void recover(RecoveryManager& queues); + virtual void stage(PersistableMessage& msg); + virtual void destroy(PersistableMessage& msg); + virtual void appendContent(PersistableMessage& msg, const std::string& data); + virtual void loadContent(PersistableMessage& msg, std::string& data, uint64_t offset, uint32_t length); + virtual void enqueue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue& queue); + virtual void dequeue(TransactionContext* ctxt, PersistableMessage& msg, const PersistableQueue& queue); + ~NullMessageStore(){} +}; + +} } |