diff options
| author | Alan Conway <aconway@apache.org> | 2007-07-28 20:44:00 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-07-28 20:44:00 +0000 |
| commit | acec2c92baed7d513bd1bb3a6a93fd3d1b7f7b1e (patch) | |
| tree | f59e5b5996837d0871066501d264bda3bafe0cfa /qpid/cpp/src | |
| parent | 5d7add0f735d963bb69f0a57a37ff9c090baf909 (diff) | |
| download | qpid-python-acec2c92baed7d513bd1bb3a6a93fd3d1b7f7b1e.tar.gz | |
Extract Recoverable interface from MessageStore interface.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@560611 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/MessageStore.h | 7 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/RecoveryManager.h | 36 |
2 files changed, 23 insertions, 20 deletions
diff --git a/qpid/cpp/src/qpid/broker/MessageStore.h b/qpid/cpp/src/qpid/broker/MessageStore.h index 1c02f94727..cf7dae9888 100644 --- a/qpid/cpp/src/qpid/broker/MessageStore.h +++ b/qpid/cpp/src/qpid/broker/MessageStore.h @@ -35,7 +35,7 @@ namespace broker { * all methods, any pointers/references to queues or messages * are valid only for the duration of the call). */ -class MessageStore : public TransactionalStore{ +class MessageStore : public TransactionalStore, public Recoverable { public: /** * Record the existence of a durable queue @@ -68,11 +68,6 @@ public: const std::string& key, const framing::FieldTable& args) = 0; /** - * Request recovery of queue and message state from store - */ - virtual void recover(RecoveryManager& recoverer) = 0; - - /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that diff --git a/qpid/cpp/src/qpid/broker/RecoveryManager.h b/qpid/cpp/src/qpid/broker/RecoveryManager.h index b6ccb74658..bf1813a093 100644 --- a/qpid/cpp/src/qpid/broker/RecoveryManager.h +++ b/qpid/cpp/src/qpid/broker/RecoveryManager.h @@ -31,20 +31,28 @@ namespace qpid { namespace broker { - class RecoveryManager{ - public: - virtual ~RecoveryManager(){} - virtual RecoverableExchange::shared_ptr recoverExchange(framing::Buffer& buffer) = 0; - virtual RecoverableQueue::shared_ptr recoverQueue(framing::Buffer& buffer) = 0; - virtual RecoverableMessage::shared_ptr recoverMessage(framing::Buffer& buffer) = 0; - virtual RecoverableTransaction::shared_ptr recoverTransaction(const std::string& xid, - std::auto_ptr<TPCTransactionContext> txn) = 0; - virtual void recoveryComplete() = 0; - }; - - -} -} +class RecoveryManager{ + public: + virtual ~RecoveryManager(){} + virtual RecoverableExchange::shared_ptr recoverExchange(framing::Buffer& buffer) = 0; + virtual RecoverableQueue::shared_ptr recoverQueue(framing::Buffer& buffer) = 0; + virtual RecoverableMessage::shared_ptr recoverMessage(framing::Buffer& buffer) = 0; + virtual RecoverableTransaction::shared_ptr recoverTransaction(const std::string& xid, + std::auto_ptr<TPCTransactionContext> txn) = 0; + virtual void recoveryComplete() = 0; +}; + +class Recoverable { + public: + virtual ~Recoverable() {} + + /** + * Request recovery of queue and message state. + */ + virtual void recover(RecoveryManager& recoverer) = 0; +}; + +}} #endif |
