diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/broker/MessageStoreModule.cpp | 5 | ||||
-rw-r--r-- | cpp/src/broker/MessageStoreModule.h | 1 | ||||
-rw-r--r-- | cpp/src/broker/NullMessageStore.cpp | 5 | ||||
-rw-r--r-- | cpp/src/broker/NullMessageStore.h | 1 | ||||
-rw-r--r-- | cpp/src/broker/TransactionalStore.h | 3 | ||||
-rw-r--r-- | cpp/src/tests/TxBufferTest.cpp | 5 |
6 files changed, 20 insertions, 0 deletions
diff --git a/cpp/src/broker/MessageStoreModule.cpp b/cpp/src/broker/MessageStoreModule.cpp index cbda7182c1..17e5d3cca8 100644 --- a/cpp/src/broker/MessageStoreModule.cpp +++ b/cpp/src/broker/MessageStoreModule.cpp @@ -107,3 +107,8 @@ void MessageStoreModule::abort(TransactionContext& ctxt) { store->abort(ctxt); } + +void MessageStoreModule::collectPreparedXids(std::set<std::string>& xids) +{ + store->collectPreparedXids(xids); +} diff --git a/cpp/src/broker/MessageStoreModule.h b/cpp/src/broker/MessageStoreModule.h index b11f844948..02c87a1bf6 100644 --- a/cpp/src/broker/MessageStoreModule.h +++ b/cpp/src/broker/MessageStoreModule.h @@ -44,6 +44,7 @@ public: void prepare(TPCTransactionContext& txn); void commit(TransactionContext& txn); void abort(TransactionContext& txn); + void collectPreparedXids(std::set<std::string>& xids); void create(const PersistableQueue& queue); void destroy(const PersistableQueue& queue); diff --git a/cpp/src/broker/NullMessageStore.cpp b/cpp/src/broker/NullMessageStore.cpp index ac40987a44..393bbb8f02 100644 --- a/cpp/src/broker/NullMessageStore.cpp +++ b/cpp/src/broker/NullMessageStore.cpp @@ -103,3 +103,8 @@ void NullMessageStore::commit(TransactionContext&) void NullMessageStore::abort(TransactionContext&) { } + +void NullMessageStore::collectPreparedXids(std::set<string>&) +{ + +} diff --git a/cpp/src/broker/NullMessageStore.h b/cpp/src/broker/NullMessageStore.h index 3d08e1a7a2..e0b215bb39 100644 --- a/cpp/src/broker/NullMessageStore.h +++ b/cpp/src/broker/NullMessageStore.h @@ -42,6 +42,7 @@ public: virtual void prepare(TPCTransactionContext& txn); virtual void commit(TransactionContext& txn); virtual void abort(TransactionContext& txn); + virtual void collectPreparedXids(std::set<std::string>& xids); virtual void create(const PersistableQueue& queue); virtual void destroy(const PersistableQueue& queue); diff --git a/cpp/src/broker/TransactionalStore.h b/cpp/src/broker/TransactionalStore.h index 9347edf0ad..2a2bac0c51 100644 --- a/cpp/src/broker/TransactionalStore.h +++ b/cpp/src/broker/TransactionalStore.h @@ -23,6 +23,7 @@ #include <memory> #include <string> +#include <set> namespace qpid { namespace broker { @@ -46,6 +47,8 @@ public: virtual void prepare(TPCTransactionContext& txn) = 0; virtual void commit(TransactionContext& txn) = 0; virtual void abort(TransactionContext& txn) = 0; + + virtual void collectPreparedXids(std::set<std::string>& xids) = 0; virtual ~TransactionalStore(){} }; diff --git a/cpp/src/tests/TxBufferTest.cpp b/cpp/src/tests/TxBufferTest.cpp index 91ccc1e47d..f87c33d817 100644 --- a/cpp/src/tests/TxBufferTest.cpp +++ b/cpp/src/tests/TxBufferTest.cpp @@ -111,6 +111,11 @@ class TxBufferTest : public CppUnit::TestCase void prepare(TPCTransactionContext&){ throw "Operation not supported"; } + void collectPreparedXids(std::set<std::string>&) + { + throw "Operation not supported"; + } + std::auto_ptr<TransactionContext> begin(){ actual.push_back(BEGIN); |