Author: aconway
Date: Sat Jul 28 13:44:00 2007
New Revision: 560611
URL: http://svn.apache.org/viewvc?view=rev&rev=560611
Log:
Extract Recoverable interface from MessageStore interface.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h
incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManager.h
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h?view=diff&rev=560611&r1=560610&r2=560611
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStore.h Sat Jul 28
13:44:00 2007
@@ -35,7 +35,7 @@
* 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
@@ -67,11 +67,6 @@
virtual void unbind(const PersistableExchange& exchange, const
PersistableQueue& queue,
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
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManager.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManager.h?view=diff&rev=560611&r1=560610&r2=560611
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManager.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManager.h Sat Jul 28
13:44:00 2007
@@ -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