summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-04-11 12:10:17 +0000
committerGordon Sim <gsim@apache.org>2007-04-11 12:10:17 +0000
commit62fcd3aba9edec066e39de64c2f1c54342282a16 (patch)
tree533f8b9410773e506d8489b7ebf05c3713051d51 /cpp/src
parentb459a5ce0fd1857d894b8c242da00283fffc1b82 (diff)
downloadqpid-python-62fcd3aba9edec066e39de64c2f1c54342282a16.tar.gz
Added extra method to transaction control interface for store plugins.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@527467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/broker/MessageStoreModule.cpp5
-rw-r--r--cpp/src/broker/MessageStoreModule.h1
-rw-r--r--cpp/src/broker/NullMessageStore.cpp5
-rw-r--r--cpp/src/broker/NullMessageStore.h1
-rw-r--r--cpp/src/broker/TransactionalStore.h3
-rw-r--r--cpp/src/tests/TxBufferTest.cpp5
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);