You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2012/07/24 20:27:55 UTC
svn commit: r1365207 - in /qpid/branches/asyncstore/cpp/src:
qpid/asyncStore/ qpid/broker/ tests/ tests/storePerftools/asyncPerf/
Author: kpvdr
Date: Tue Jul 24 18:27:54 2012
New Revision: 1365207
URL: http://svn.apache.org/viewvc?rev=1365207&view=rev
Log:
QPID-3858: WIP: Renamed AsyncTransaction to AsyncTransactionalStore; changed some of the broker contexts to more specific classes.
Modified:
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.h
qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h
qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h
qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h
qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake
qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/TxnPublish.cpp
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp Tue Jul 24 18:27:54 2012
@@ -23,11 +23,10 @@
#include "AsyncOperation.h"
-//#include "qpid/Exception.h"
#include "qpid/broker/AsyncResultHandle.h"
#include "qpid/broker/AsyncResultHandleImpl.h"
-
-//#include <sstream>
+#include "qpid/broker/QueueAsyncContext.h"
+#include "qpid/broker/TxnAsyncContext.h"
namespace qpid {
namespace asyncStore {
@@ -68,8 +67,8 @@ AsyncOperation::submitResult(const int e
// --- class AsyncOpTxnPrepare ---
AsyncOpTxnPrepare::AsyncOpTxnPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
- AsyncOperation(brokerCtxt),
+ boost::shared_ptr<qpid::broker::TpcTxnAsyncContext> txnCtxt) :
+ AsyncOperation(boost::dynamic_pointer_cast<qpid::broker::BrokerAsyncContext>(txnCtxt)),
m_txnHandle(txnHandle)
{}
@@ -91,8 +90,8 @@ AsyncOpTxnPrepare::getOpStr() const {
// --- class AsyncOpTxnCommit ---
AsyncOpTxnCommit::AsyncOpTxnCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
- AsyncOperation(brokerCtxt),
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> txnCtxt) :
+ AsyncOperation(boost::dynamic_pointer_cast<qpid::broker::BrokerAsyncContext>(txnCtxt)),
m_txnHandle(txnHandle)
{}
@@ -113,8 +112,8 @@ AsyncOpTxnCommit::getOpStr() const {
// --- class AsyncOpTxnAbort ---
AsyncOpTxnAbort::AsyncOpTxnAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
- AsyncOperation(brokerCtxt),
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> txnCtxt) :
+ AsyncOperation(boost::dynamic_pointer_cast<qpid::broker::BrokerAsyncContext>(txnCtxt)),
m_txnHandle(txnHandle)
{}
@@ -181,9 +180,9 @@ AsyncOpConfigDestroy::getOpStr() const {
// --- class AsyncOpQueueCreate ---
AsyncOpQueueCreate::AsyncOpQueueCreate(qpid::broker::QueueHandle& queueHandle,
- const qpid::broker::DataSource* const data,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
- AsyncOperation(brokerCtxt),
+ const qpid::broker::DataSource* const data,
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> queueCtxt) :
+ AsyncOperation(boost::dynamic_pointer_cast<qpid::broker::BrokerAsyncContext>(queueCtxt)),
m_queueHandle(queueHandle),
m_data(data)
{}
@@ -205,8 +204,8 @@ AsyncOpQueueCreate::getOpStr() const {
// --- class AsyncOpQueueFlush ---
AsyncOpQueueFlush::AsyncOpQueueFlush(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
- AsyncOperation(brokerCtxt),
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> queueCtxt) :
+ AsyncOperation(boost::dynamic_pointer_cast<qpid::broker::BrokerAsyncContext>(queueCtxt)),
m_queueHandle(queueHandle)
{}
@@ -227,8 +226,8 @@ AsyncOpQueueFlush::getOpStr() const {
// --- class AsyncOpQueueDestroy ---
AsyncOpQueueDestroy::AsyncOpQueueDestroy(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
- AsyncOperation(brokerCtxt),
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> queueCtxt) :
+ AsyncOperation(boost::dynamic_pointer_cast<qpid::broker::BrokerAsyncContext>(queueCtxt)),
m_queueHandle(queueHandle)
{}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h Tue Jul 24 18:27:54 2012
@@ -51,7 +51,7 @@ private:
class AsyncOpTxnPrepare: public qpid::asyncStore::AsyncOperation {
public:
AsyncOpTxnPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::TpcTxnAsyncContext> txnCtxt);
virtual ~AsyncOpTxnPrepare();
virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
virtual const char* getOpStr() const;
@@ -63,7 +63,7 @@ private:
class AsyncOpTxnCommit: public qpid::asyncStore::AsyncOperation {
public:
AsyncOpTxnCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> txnCtxt);
virtual ~AsyncOpTxnCommit();
virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
virtual const char* getOpStr() const;
@@ -75,7 +75,7 @@ private:
class AsyncOpTxnAbort: public qpid::asyncStore::AsyncOperation {
public:
AsyncOpTxnAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> txnCtxt);
virtual ~AsyncOpTxnAbort();
virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
virtual const char* getOpStr() const;
@@ -114,7 +114,7 @@ class AsyncOpQueueCreate: public qpid::a
public:
AsyncOpQueueCreate(qpid::broker::QueueHandle& queueHandle,
const qpid::broker::DataSource* const data,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> queueCtxt);
virtual ~AsyncOpQueueCreate();
virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
virtual const char* getOpStr() const;
@@ -127,7 +127,7 @@ private:
class AsyncOpQueueFlush: public qpid::asyncStore::AsyncOperation {
public:
AsyncOpQueueFlush(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> queueCtxt);
virtual ~AsyncOpQueueFlush();
virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
virtual const char* getOpStr() const;
@@ -139,7 +139,7 @@ private:
class AsyncOpQueueDestroy: public qpid::asyncStore::AsyncOperation {
public:
AsyncOpQueueDestroy(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> queueCtxt);
virtual ~AsyncOpQueueDestroy();
virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
virtual const char* getOpStr() const;
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp Tue Jul 24 18:27:54 2012
@@ -35,11 +35,11 @@
#include "qpid/broker/EnqueueHandle.h"
#include "qpid/broker/EventHandle.h"
#include "qpid/broker/MessageHandle.h"
+#include "qpid/broker/QueueAsyncContext.h"
#include "qpid/broker/QueueHandle.h"
+#include "qpid/broker/TxnAsyncContext.h"
#include "qpid/broker/TxnHandle.h"
-//#include <boost/make_shared.hpp>
-
namespace qpid {
namespace asyncStore {
@@ -95,28 +95,28 @@ AsyncStoreImpl::createTxnHandle(const st
void
AsyncStoreImpl::submitPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::TpcTxnAsyncContext> TxnCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnPrepare(txnHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnPrepare(txnHandle, TxnCtxt));
+ TxnCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
void
AsyncStoreImpl::submitCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnCommit(txnHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnCommit(txnHandle, TxnCtxt));
+ TxnCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
void
AsyncStoreImpl::submitAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnAbort(txnHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnAbort(txnHandle, TxnCtxt));
+ TxnCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
@@ -178,28 +178,28 @@ AsyncStoreImpl::submitDestroy(qpid::brok
void
AsyncStoreImpl::submitCreate(qpid::broker::QueueHandle& queueHandle,
const qpid::broker::DataSource* const dataSrc,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueCreate(queueHandle, dataSrc, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueCreate(queueHandle, dataSrc, QueueCtxt));
+ QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
void
AsyncStoreImpl::submitDestroy(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueDestroy(queueHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueDestroy(queueHandle, QueueCtxt));
+ QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
void
AsyncStoreImpl::submitFlush(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueFlush(queueHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueFlush(queueHandle, QueueCtxt));
+ QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
@@ -227,20 +227,20 @@ AsyncStoreImpl::submitDestroy(qpid::brok
void
AsyncStoreImpl::submitEnqueue(qpid::broker::EnqueueHandle& enqHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgEnqueue(enqHandle, txnHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgEnqueue(enqHandle, txnHandle, QueueCtxt));
+ QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
void
AsyncStoreImpl::submitDequeue(qpid::broker::EnqueueHandle& enqHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgDequeue(enqHandle, txnHandle, brokerCtxt));
- brokerCtxt->setOpStr(op->getOpStr());
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgDequeue(enqHandle, txnHandle, QueueCtxt));
+ QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.h?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.h Tue Jul 24 18:27:54 2012
@@ -42,7 +42,9 @@ class Poller;
namespace asyncStore {
-class AsyncStoreImpl : public qpid::broker::AsyncStore {
+class AsyncStoreImpl : public qpid::broker::AsyncTransactionalStore,
+ public qpid::broker::AsyncStore
+{
public:
AsyncStoreImpl(boost::shared_ptr<qpid::sys::Poller> poller,
const AsyncStoreOptions& opts);
@@ -63,11 +65,11 @@ public:
qpid::broker::TxnBuffer* tb);
void submitPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::TpcTxnAsyncContext> TxnCtxt);
void submitCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt);
void submitAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt);
// --- Interface from AsyncStore ---
@@ -89,11 +91,11 @@ public:
void submitCreate(qpid::broker::QueueHandle& queueHandle,
const qpid::broker::DataSource* const dataSrc,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt);
void submitDestroy(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt);
void submitFlush(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt);
void submitCreate(qpid::broker::EventHandle& eventHandle,
const qpid::broker::DataSource* const dataSrc,
@@ -105,10 +107,10 @@ public:
void submitEnqueue(qpid::broker::EnqueueHandle& enqHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt);
void submitDequeue(qpid::broker::EnqueueHandle& enqHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt);
// Legacy - Restore FTD message, is NOT async!
virtual int loadContent(qpid::broker::MessageHandle& msgHandle,
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h Tue Jul 24 18:27:54 2012
@@ -68,11 +68,14 @@ class MessageHandle;
class QueueHandle;
class TxnHandle;
+class QueueAsyncContext;
+class TpcTxnAsyncContext;
+class TxnAsyncContext;
class TxnBuffer;
-class AsyncTransaction {
+class AsyncTransactionalStore {
public:
- virtual ~AsyncTransaction() {}
+ virtual ~AsyncTransactionalStore() {}
virtual TxnHandle createTxnHandle() = 0;
virtual TxnHandle createTxnHandle(TxnBuffer* tb) = 0;
@@ -82,16 +85,16 @@ public:
// TODO: Remove boost::shared_ptr<BrokerAsyncContext> from this interface
virtual void submitPrepare(TxnHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0; // Distributed txns only
+ boost::shared_ptr<TpcTxnAsyncContext>) = 0; // Distributed txns only
virtual void submitCommit(TxnHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<TxnAsyncContext>) = 0;
virtual void submitAbort(TxnHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<TxnAsyncContext>) = 0;
void testOp() const {}
};
// Subclassed by store:
-class AsyncStore : public AsyncTransaction {
+class AsyncStore {
public:
virtual ~AsyncStore() {}
@@ -110,6 +113,9 @@ public:
// --- Store async interface ---
// TODO: Remove boost::shared_ptr<BrokerAsyncContext> from this interface
+
+ // TODO: Switch from BrokerAsyncContext (parent class) to ConfigAsyncContext
+ // when theses features (and async context classes) are developed.
virtual void submitCreate(ConfigHandle&,
const DataSource* const,
boost::shared_ptr<BrokerAsyncContext>) = 0;
@@ -118,12 +124,14 @@ public:
virtual void submitCreate(QueueHandle&,
const DataSource* const,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<QueueAsyncContext>) = 0;
virtual void submitDestroy(QueueHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<QueueAsyncContext>) = 0;
virtual void submitFlush(QueueHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<QueueAsyncContext>) = 0;
+ // TODO: Switch from BrokerAsyncContext (parent class) to EventAsyncContext
+ // when theses features (and async context classes) are developed.
virtual void submitCreate(EventHandle&,
const DataSource* const,
TxnHandle&,
@@ -134,10 +142,10 @@ public:
virtual void submitEnqueue(EnqueueHandle&,
TxnHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<QueueAsyncContext>) = 0;
virtual void submitDequeue(EnqueueHandle&,
TxnHandle&,
- boost::shared_ptr<BrokerAsyncContext>) = 0;
+ boost::shared_ptr<QueueAsyncContext>) = 0;
// Legacy - Restore FTD message, is NOT async!
virtual int loadContent(MessageHandle&,
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h Tue Jul 24 18:27:54 2012
@@ -29,17 +29,18 @@
#include "qpid/asyncStore/AsyncOperation.h"
namespace qpid {
-namespace asyncStore {
-class AsyncOperation;
-}
+//namespace asyncStore {
+//class AsyncOperation;
+//}
namespace broker {
-class TxnHandle;
+class AsyncResultHandle;
+class AsyncResultQueue;
+//class TxnHandle;
typedef void (*AsyncResultCallback)(const AsyncResultHandle* const);
-class TxnAsyncContext: public BrokerAsyncContext
-{
+class TxnAsyncContext: public BrokerAsyncContext {
public:
TxnAsyncContext(TxnBuffer* const tb,
AsyncResultCallback rcb,
@@ -57,6 +58,16 @@ private:
AsyncResultQueue* const m_arq;
};
+class TpcTxnAsyncContext : public TxnAsyncContext {
+public:
+ TpcTxnAsyncContext(TxnBuffer* const tb,
+ AsyncResultCallback rcb,
+ AsyncResultQueue* const arq) :
+ TxnAsyncContext(tb, rcb, arq)
+ {}
+ virtual ~TpcTxnAsyncContext() {}
+};
+
}} // namespace qpid::broker
#endif // qpid_broker_TxnAsyncContext_h_
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp Tue Jul 24 18:27:54 2012
@@ -81,7 +81,7 @@ TxnBuffer::rollback()
}
bool
-TxnBuffer::commitLocal(AsyncTransaction* const store)
+TxnBuffer::commitLocal(AsyncTransactionalStore* const store)
{
if (store) {
try {
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h Tue Jul 24 18:27:54 2012
@@ -36,7 +36,7 @@ namespace broker {
class AsyncResultHandle;
class AsyncResultQueue;
-class AsyncTransaction;
+class AsyncTransactionalStore;
class TxnOp;
class TxnBuffer {
@@ -48,7 +48,7 @@ public:
bool prepare(TxnHandle& th);
void commit();
void rollback();
- bool commitLocal(AsyncTransaction* const store);
+ bool commitLocal(AsyncTransactionalStore* const store);
// --- Async operations ---
void asyncLocalCommit();
@@ -60,7 +60,7 @@ private:
std::vector<boost::shared_ptr<TxnOp> > m_ops;
qpid::sys::Mutex m_opsMutex;
TxnHandle m_txnHandle;
- AsyncTransaction* m_store;
+ AsyncTransactionalStore* m_store;
AsyncResultQueue& m_resultQueue;
typedef enum {NONE = 0, PREPARE, COMMIT, ROLLBACK, COMPLETE} e_txnState;
Modified: qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake (original)
+++ qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake Tue Jul 24 18:27:54 2012
@@ -59,7 +59,6 @@ set (asyncStorePerf_SOURCES
storePerftools/asyncPerf/MessageProducer.cpp
storePerftools/asyncPerf/PerfTest.cpp
storePerftools/asyncPerf/PersistableQueuedMessage.cpp
-# storePerftools/asyncPerf/QueueAsyncContext.cpp
storePerftools/asyncPerf/QueuedMessage.cpp
storePerftools/asyncPerf/SimpleMessage.cpp
storePerftools/asyncPerf/SimpleQueue.cpp
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/TxnPublish.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/TxnPublish.cpp?rev=1365207&r1=1365206&r2=1365207&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/TxnPublish.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/TxnPublish.cpp Tue Jul 24 18:27:54 2012
@@ -29,7 +29,6 @@
#include "SimpleQueue.h"
#include "qpid/log/Statement.h"
-
#include <boost/make_shared.hpp>
namespace tests {
@@ -100,9 +99,9 @@ TxnPublish::deliverTo(const boost::share
{
boost::shared_ptr<QueuedMessage> qm;
if (m_msg->isPersistent() && queue->getStore()) {
- qm = boost::make_shared<PersistableQueuedMessage>(new PersistableQueuedMessage(queue.get(), m_msg));
+ qm = boost::shared_ptr<PersistableQueuedMessage>(new PersistableQueuedMessage(queue.get(), m_msg));
} else {
- qm = boost::make_shared<QueuedMessage>(new QueuedMessage(queue.get(), m_msg));
+ qm = boost::shared_ptr<QueuedMessage>(new QueuedMessage(queue.get(), m_msg));
}
m_queues.push_back(qm);
m_delivered = true;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org