summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-07-28 20:44:00 +0000
committerAlan Conway <aconway@apache.org>2007-07-28 20:44:00 +0000
commit04a5eca2d8ff39952f8b76a647572756f277b17c (patch)
tree5170224dbed8a0e9cd156bc5acb3b69dd99b56c3 /cpp/src/qpid
parentc7f03e1f039ecd385b13da9c0e571b6090f71018 (diff)
downloadqpid-python-04a5eca2d8ff39952f8b76a647572756f277b17c.tar.gz
Extract Recoverable interface from MessageStore interface.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@560611 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/broker/MessageStore.h7
-rw-r--r--cpp/src/qpid/broker/RecoveryManager.h36
2 files changed, 23 insertions, 20 deletions
diff --git a/cpp/src/qpid/broker/MessageStore.h b/cpp/src/qpid/broker/MessageStore.h
index 1c02f94727..cf7dae9888 100644
--- a/cpp/src/qpid/broker/MessageStore.h
+++ b/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/cpp/src/qpid/broker/RecoveryManager.h b/cpp/src/qpid/broker/RecoveryManager.h
index b6ccb74658..bf1813a093 100644
--- a/cpp/src/qpid/broker/RecoveryManager.h
+++ b/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