diff options
author | Gordon Sim <gsim@apache.org> | 2006-12-13 09:22:07 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2006-12-13 09:22:07 +0000 |
commit | d89955fa13d7356209713d28b14243392acde8c5 (patch) | |
tree | f7fe3ec45908672be81494804ede987846b30c49 /qpid/cpp/lib/broker | |
parent | 454d71a6a004f42e3137db5351ece5a78781b277 (diff) | |
download | qpid-python-d89955fa13d7356209713d28b14243392acde8c5.tar.gz |
Added prepared() method to MessageStore interface.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@486555 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/broker')
-rw-r--r-- | qpid/cpp/lib/broker/MessageStore.h | 5 | ||||
-rw-r--r-- | qpid/cpp/lib/broker/MessageStoreModule.cpp | 5 | ||||
-rw-r--r-- | qpid/cpp/lib/broker/MessageStoreModule.h | 5 | ||||
-rw-r--r-- | qpid/cpp/lib/broker/NullMessageStore.cpp | 5 | ||||
-rw-r--r-- | qpid/cpp/lib/broker/NullMessageStore.h | 5 |
5 files changed, 21 insertions, 4 deletions
diff --git a/qpid/cpp/lib/broker/MessageStore.h b/qpid/cpp/lib/broker/MessageStore.h index acbff82c35..938f807a67 100644 --- a/qpid/cpp/lib/broker/MessageStore.h +++ b/qpid/cpp/lib/broker/MessageStore.h @@ -117,6 +117,11 @@ namespace qpid { * place or null for 'local' transactions */ 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 prepared. + */ + virtual void prepared(const std::string * const xid) = 0; /** * Treat all enqueue/dequeues where this xid was specified as being committed. */ diff --git a/qpid/cpp/lib/broker/MessageStoreModule.cpp b/qpid/cpp/lib/broker/MessageStoreModule.cpp index 1952786014..ccc5501379 100644 --- a/qpid/cpp/lib/broker/MessageStoreModule.cpp +++ b/qpid/cpp/lib/broker/MessageStoreModule.cpp @@ -73,6 +73,11 @@ void MessageStoreModule::dequeue(TransactionContext* ctxt, Message* const msg, c store->dequeue(ctxt, msg, queue, xid); } +void MessageStoreModule::prepared(const string * const xid) +{ + store->prepared(xid); +} + void MessageStoreModule::committed(const string * const xid) { store->committed(xid); diff --git a/qpid/cpp/lib/broker/MessageStoreModule.h b/qpid/cpp/lib/broker/MessageStoreModule.h index fcff71bd35..c49e06efa1 100644 --- a/qpid/cpp/lib/broker/MessageStoreModule.h +++ b/qpid/cpp/lib/broker/MessageStoreModule.h @@ -45,8 +45,9 @@ namespace qpid { void loadContent(Message* const msg, std::string& data, u_int64_t offset, u_int32_t length); void enqueue(TransactionContext* ctxt, Message* const msg, const Queue& queue, const string * const xid); void dequeue(TransactionContext* ctxt, Message* const msg, const Queue& queue, const string * const xid); - void committed(const string * const xid); - void aborted(const string * const xid); + void prepared(const std::string * const xid); + void committed(const std::string * const xid); + void aborted(const std::string * const xid); std::auto_ptr<TransactionContext> begin(); void commit(TransactionContext* ctxt); void abort(TransactionContext* ctxt); diff --git a/qpid/cpp/lib/broker/NullMessageStore.cpp b/qpid/cpp/lib/broker/NullMessageStore.cpp index a8318a4bf7..571ca7566b 100644 --- a/qpid/cpp/lib/broker/NullMessageStore.cpp +++ b/qpid/cpp/lib/broker/NullMessageStore.cpp @@ -75,6 +75,11 @@ void NullMessageStore::dequeue(TransactionContext*, Message* const, const Queue& if (warn) std::cout << "WARNING: Can't dequeue message from '" << queue.getName() << "'. Persistence not enabled." << std::endl; } +void NullMessageStore::prepared(const string * const) +{ + if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; +} + void NullMessageStore::committed(const string * const) { if (warn) std::cout << "WARNING: Persistence not enabled." << std::endl; diff --git a/qpid/cpp/lib/broker/NullMessageStore.h b/qpid/cpp/lib/broker/NullMessageStore.h index 913d6b0a8d..ef2bea8fd6 100644 --- a/qpid/cpp/lib/broker/NullMessageStore.h +++ b/qpid/cpp/lib/broker/NullMessageStore.h @@ -44,8 +44,9 @@ namespace qpid { virtual void loadContent(Message* const msg, std::string& data, u_int64_t offset, u_int32_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 committed(const string * const xid); - virtual void aborted(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); |