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/20 14:55:21 UTC

svn commit: r1363759 - in /qpid/branches/asyncstore/cpp/src: qpid/asyncStore/ qpid/broker/ tests/storePerftools/asyncPerf/

Author: kpvdr
Date: Fri Jul 20 12:55:20 2012
New Revision: 1363759

URL: http://svn.apache.org/viewvc?rev=1363759&view=rev
Log:
QPID-3858: WIP: Created many async operation classes for each op instead of a single class with op codes.

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/OperationQueue.cpp
    qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.h
    qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.h
    qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h
    qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp
    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/storePerftools/asyncPerf/MessageAsyncContext.cpp
    qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.h
    qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.cpp
    qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.h
    qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp
    qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp Fri Jul 20 12:55:20 2012
@@ -23,101 +23,320 @@
 
 #include "AsyncOperation.h"
 
-#include "qpid/Exception.h"
+//#include "qpid/Exception.h"
+#include "qpid/broker/AsyncResultHandle.h"
+#include "qpid/broker/AsyncResultHandleImpl.h"
 
-#include <sstream>
+//#include <sstream>
 
 namespace qpid {
 namespace asyncStore {
 
-AsyncOperation::AsyncOperation() :
-        m_op(NONE),
-        m_targetHandle(),
-        m_dataSrc(0),
-        m_txnHandle(0)
+AsyncOperation::AsyncOperation(boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        m_brokerCtxt(brokerCtxt)
 {}
 
-AsyncOperation::AsyncOperation(const opCode op,
-                               const AsyncStoreHandle* th,
-                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
-        m_op(op),
-        m_targetHandle(th),
-        m_dataSrc(0),
-        m_txnHandle(0),
-        m_brokerCtxt(brokerCtxt)
+AsyncOperation::~AsyncOperation()
 {}
 
-AsyncOperation::AsyncOperation(const opCode op,
-                               const AsyncStoreHandle* th,
-                               const qpid::broker::DataSource* const dataSrc,
-                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
-        m_op(op),
-        m_targetHandle(th),
-        m_dataSrc(dataSrc),
-        m_txnHandle(0),
-        m_brokerCtxt(brokerCtxt)
+boost::shared_ptr<qpid::broker::BrokerAsyncContext> AsyncOperation::getBrokerContext() const
+{
+    return m_brokerCtxt;
+}
+
+void
+AsyncOperation::submitResult()
+{
+    return submitResult(0, "");
+}
+
+void
+AsyncOperation::submitResult(const int errNo,
+                             const std::string& errMsg)
+{
+    if (m_brokerCtxt.get()) {
+        qpid::broker::AsyncResultQueue* const arq = m_brokerCtxt->getAsyncResultQueue();
+        if (arq) {
+            qpid::broker::AsyncResultHandleImpl* arhi = new qpid::broker::AsyncResultHandleImpl(errNo, errMsg, m_brokerCtxt);
+            boost::shared_ptr<qpid::broker::AsyncResultHandle> arh(new qpid::broker::AsyncResultHandle(arhi));
+            arq->submit(arh);
+        }
+    }
+}
+
+
+// --- class AsyncOpTxnPrepare ---
+
+AsyncOpTxnPrepare::AsyncOpTxnPrepare(qpid::broker::TxnHandle& txnHandle,
+                                     boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_txnHandle(txnHandle)
 {}
 
-AsyncOperation::AsyncOperation(const opCode op,
-                               const AsyncStoreHandle* th,
-                               const qpid::broker::TxnHandle* txnHandle,
-                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
-        m_op(op),
-        m_targetHandle(th),
-        m_dataSrc(0),
-        m_txnHandle(txnHandle),
-        m_brokerCtxt(brokerCtxt)
+AsyncOpTxnPrepare::~AsyncOpTxnPrepare() {}
+
+void
+AsyncOpTxnPrepare::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpTxnPrepare::getOpStr() const {
+    return "TXN_PREPARE";
+}
+
+
+
+// --- class AsyncOpTxnCommit ---
+
+AsyncOpTxnCommit::AsyncOpTxnCommit(qpid::broker::TxnHandle& txnHandle,
+                                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_txnHandle(txnHandle)
 {}
 
-AsyncOperation::AsyncOperation(const opCode op,
-                               const AsyncStoreHandle* th,
-                               const qpid::broker::DataSource* const dataSrc,
-                               const qpid::broker::TxnHandle* txnHandle,
-                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
-        m_op(op),
-        m_targetHandle(th),
-        m_dataSrc(dataSrc),
-        m_txnHandle(txnHandle),
-        m_brokerCtxt(brokerCtxt)
+AsyncOpTxnCommit::~AsyncOpTxnCommit() {}
+
+void
+AsyncOpTxnCommit::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpTxnCommit::getOpStr() const {
+    return "TXN_COMMIT";
+}
+
+
+// --- class AsyncOpTxnAbort ---
+
+AsyncOpTxnAbort::AsyncOpTxnAbort(qpid::broker::TxnHandle& txnHandle,
+                                 boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_txnHandle(txnHandle)
 {}
 
-AsyncOperation::~AsyncOperation()
+AsyncOpTxnAbort::~AsyncOpTxnAbort() {}
+
+void
+AsyncOpTxnAbort::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpTxnAbort::getOpStr() const {
+    return "TXN_ABORT";
+}
+
+
+// --- class AsyncOpConfigCreate ---
+
+AsyncOpConfigCreate::AsyncOpConfigCreate(qpid::broker::ConfigHandle& cfgHandle,
+                                         const qpid::broker::DataSource* const data,
+                                         boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_cfgHandle(cfgHandle),
+        m_data(data)
 {}
 
+AsyncOpConfigCreate::~AsyncOpConfigCreate() {}
+
+void
+AsyncOpConfigCreate::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
 const char*
-AsyncOperation::getOpStr() const
-{
-    return getOpStr(m_op);
+AsyncOpConfigCreate::getOpStr() const {
+    return "CONFIG_CREATE";
 }
 
-boost::shared_ptr<qpid::broker::BrokerAsyncContext>
-AsyncOperation::getBrokerContext() const
-{
-    return m_brokerCtxt;
+
+// --- class AsyncOpConfigDestroy ---
+
+AsyncOpConfigDestroy::AsyncOpConfigDestroy(qpid::broker::ConfigHandle& cfgHandle,
+                                           boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_cfgHandle(cfgHandle)
+{}
+
+AsyncOpConfigDestroy::~AsyncOpConfigDestroy() {}
+
+void
+AsyncOpConfigDestroy::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
 }
 
-//static
 const char*
-AsyncOperation::getOpStr(const opCode op)
-{
-    switch (op) {
-    case NONE: return "<none>";
-    case TXN_PREPARE: return "TXN_PREPARE";
-    case TXN_COMMIT: return "TXN_COMMIT";
-    case TXN_ABORT: return "TXN_ABORT";
-    case CONFIG_CREATE: return "CONFIG_CREATE";
-    case CONFIG_DESTROY: return "CONFIG_DESTROY";
-    case QUEUE_CREATE: return "QUEUE_CREATE";
-    case QUEUE_FLUSH: return "QUEUE_FLUSH";
-    case QUEUE_DESTROY: return "QUEUE_DESTROY";
-    case EVENT_CREATE: return "EVENT_CREATE";
-    case EVENT_DESTROY: return "EVENT_DESTROY";
-    case MSG_ENQUEUE: return "MSG_ENQUEUE";
-    case MSG_DEQUEUE: return "MSG_DEQUEUE";
-    }
-    std::ostringstream oss;
-    oss << "AsyncStore: AsyncOperation::getOpStr(): Unknown op-code \"" << op << "\"";
-    throw qpid::Exception(oss.str());
+AsyncOpConfigDestroy::getOpStr() const {
+    return "CONFIG_DESTROY";
+}
+
+
+// --- class AsyncOpQueueCreate ---
+
+AsyncOpQueueCreate::AsyncOpQueueCreate(qpid::broker::QueueHandle& queueHandle,
+                   const qpid::broker::DataSource* const data,
+                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_queueHandle(queueHandle),
+        m_data(data)
+{}
+
+AsyncOpQueueCreate::~AsyncOpQueueCreate() {}
+
+void
+AsyncOpQueueCreate::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpQueueCreate::getOpStr() const {
+    return "QUEUE_CREATE";
+}
+
+
+// --- class AsyncOpQueueFlush ---
+
+AsyncOpQueueFlush::AsyncOpQueueFlush(qpid::broker::QueueHandle& queueHandle,
+                  boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_queueHandle(queueHandle)
+{}
+
+AsyncOpQueueFlush::~AsyncOpQueueFlush() {}
+
+void
+AsyncOpQueueFlush::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpQueueFlush::getOpStr() const {
+    return "QUEUE_FLUSH";
+}
+
+
+// --- class AsyncOpQueueDestroy ---
+
+AsyncOpQueueDestroy::AsyncOpQueueDestroy(qpid::broker::QueueHandle& queueHandle,
+                                         boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_queueHandle(queueHandle)
+{}
+
+AsyncOpQueueDestroy::~AsyncOpQueueDestroy() {}
+
+void
+AsyncOpQueueDestroy::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpQueueDestroy::getOpStr() const {
+    return "QUEUE_DESTROY";
+}
+
+
+// --- class AsyncOpEventCreate ---
+
+AsyncOpEventCreate::AsyncOpEventCreate(qpid::broker::EventHandle& evtHandle,
+                   const qpid::broker::DataSource* const data,
+                   qpid::broker::TxnHandle& txnHandle,
+                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_evtHandle(evtHandle),
+        m_data(data),
+        m_txnHandle(txnHandle)
+{}
+
+AsyncOpEventCreate::~AsyncOpEventCreate() {}
+
+void
+AsyncOpEventCreate::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpEventCreate::getOpStr() const {
+    return "EVENT_CREATE";
+}
+
+
+// --- class AsyncOpEventDestroy ---
+
+AsyncOpEventDestroy::AsyncOpEventDestroy(qpid::broker::EventHandle& evtHandle,
+                    qpid::broker::TxnHandle& txnHandle,
+                    boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_evtHandle(evtHandle),
+        m_txnHandle(txnHandle)
+{}
+
+AsyncOpEventDestroy::~AsyncOpEventDestroy() {}
+
+void
+AsyncOpEventDestroy::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char*
+AsyncOpEventDestroy::getOpStr() const {
+    return "EVENT_DESTROY";
+}
+
+
+// --- class AsyncOpMsgEnqueue ---
+
+AsyncOpMsgEnqueue::AsyncOpMsgEnqueue(qpid::broker::EnqueueHandle& enqHandle,
+                  qpid::broker::TxnHandle& txnHandle,
+                  boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_enqHandle(enqHandle),
+        m_txnHandle(txnHandle)
+{}
+
+AsyncOpMsgEnqueue::~AsyncOpMsgEnqueue() {}
+
+void AsyncOpMsgEnqueue::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char* AsyncOpMsgEnqueue::getOpStr() const {
+    return "MSG_ENQUEUE";
+}
+
+
+// --- class AsyncOpMsgDequeue ---
+
+AsyncOpMsgDequeue::AsyncOpMsgDequeue(qpid::broker::EnqueueHandle& enqHandle,
+                  qpid::broker::TxnHandle& txnHandle,
+                  boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
+        AsyncOperation(brokerCtxt),
+        m_enqHandle(enqHandle),
+        m_txnHandle(txnHandle)
+{}
+
+AsyncOpMsgDequeue::~AsyncOpMsgDequeue() {}
+
+void AsyncOpMsgDequeue::executeOp(boost::shared_ptr<AsyncStoreImpl> /*store*/) {
+    // TODO: Implement store operation here
+    submitResult();
+}
+
+const char* AsyncOpMsgDequeue::getOpStr() const {
+    return "MSG_DEQUEUE";
 }
 
 }} // namespace qpid::asyncStore

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.h Fri Jul 20 12:55:20 2012
@@ -26,57 +26,185 @@
 
 #include "qpid/broker/AsyncStore.h"
 
+#include <boost/shared_ptr.hpp>
+
 namespace qpid {
 namespace asyncStore {
-class AsyncStoreHandle;
+class AsyncStoreImpl;
 
 class AsyncOperation {
 public:
-    typedef enum {NONE=0,
-                  TXN_PREPARE,
-                  TXN_COMMIT,
-                  TXN_ABORT,
-                  CONFIG_CREATE,
-                  CONFIG_DESTROY,
-                  QUEUE_CREATE,
-                  QUEUE_FLUSH,
-                  QUEUE_DESTROY,
-                  EVENT_CREATE,
-                  EVENT_DESTROY,
-                  MSG_ENQUEUE,
-                  MSG_DEQUEUE
-    } opCode;
-
-    AsyncOperation();
-    AsyncOperation(const opCode op,
-                   const AsyncStoreHandle* th,
-                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
-    AsyncOperation(const opCode op,
-                   const AsyncStoreHandle* th,
-                   const qpid::broker::DataSource* const dataSrc,
-                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
-    AsyncOperation(const opCode op,
-                   const AsyncStoreHandle* th,
-                   const qpid::broker::TxnHandle* txnHandle,
-                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
-    AsyncOperation(const opCode op,
-                   const AsyncStoreHandle* th,
-                   const qpid::broker::DataSource* const dataSrc,
-                   const qpid::broker::TxnHandle* txnHandle,
-                   boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    AsyncOperation(boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
     virtual ~AsyncOperation();
-    const char* getOpStr() const;
-    static const char* getOpStr(const opCode op);
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store) = 0;
     boost::shared_ptr<qpid::broker::BrokerAsyncContext> getBrokerContext() const;
-
+    virtual const char* getOpStr() const = 0;
+protected:
+    void submitResult();
+    void submitResult(const int errNo,
+                      const std::string& errMsg);
 private:
-    opCode m_op;
-    const AsyncStoreHandle* m_targetHandle;
-    const qpid::broker::DataSource* const m_dataSrc;
-    const qpid::broker::TxnHandle* m_txnHandle;
     boost::shared_ptr<qpid::broker::BrokerAsyncContext> const m_brokerCtxt;
 };
 
+
+class AsyncOpTxnPrepare: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpTxnPrepare(qpid::broker::TxnHandle& txnHandle,
+                      boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpTxnPrepare();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
+
+class AsyncOpTxnCommit: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpTxnCommit(qpid::broker::TxnHandle& txnHandle,
+                     boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpTxnCommit();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
+
+class AsyncOpTxnAbort: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpTxnAbort(qpid::broker::TxnHandle& txnHandle,
+                    boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpTxnAbort();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
+
+class AsyncOpConfigCreate: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpConfigCreate(qpid::broker::ConfigHandle& cfgHandle,
+                        const qpid::broker::DataSource* const data,
+                        boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpConfigCreate();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::ConfigHandle& m_cfgHandle;
+    const qpid::broker::DataSource* const m_data;
+};
+
+
+class AsyncOpConfigDestroy: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpConfigDestroy(qpid::broker::ConfigHandle& cfgHandle,
+                         boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpConfigDestroy();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::ConfigHandle& m_cfgHandle;
+};
+
+
+class AsyncOpQueueCreate: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpQueueCreate(qpid::broker::QueueHandle& queueHandle,
+                       const qpid::broker::DataSource* const data,
+                       boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpQueueCreate();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::QueueHandle& m_queueHandle;
+    const qpid::broker::DataSource* const m_data;
+};
+
+
+class AsyncOpQueueFlush: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpQueueFlush(qpid::broker::QueueHandle& queueHandle,
+                      boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpQueueFlush();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::QueueHandle& m_queueHandle;
+};
+
+
+class AsyncOpQueueDestroy: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpQueueDestroy(qpid::broker::QueueHandle& queueHandle,
+                      boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpQueueDestroy();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::QueueHandle& m_queueHandle;
+};
+
+
+class AsyncOpEventCreate: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpEventCreate(qpid::broker::EventHandle& evtHandle,
+                       const qpid::broker::DataSource* const data,
+                       qpid::broker::TxnHandle& txnHandle,
+                       boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpEventCreate();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::EventHandle& m_evtHandle;
+    const qpid::broker::DataSource* const m_data;
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
+
+class AsyncOpEventDestroy: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpEventDestroy(qpid::broker::EventHandle& evtHandle,
+                        qpid::broker::TxnHandle& txnHandle,
+                        boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpEventDestroy();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::EventHandle& m_evtHandle;
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
+
+class AsyncOpMsgEnqueue: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpMsgEnqueue(qpid::broker::EnqueueHandle& enqHandle,
+                      qpid::broker::TxnHandle& txnHandle,
+                      boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpMsgEnqueue();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::EnqueueHandle& m_enqHandle;
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
+
+class AsyncOpMsgDequeue: public qpid::asyncStore::AsyncOperation {
+public:
+    AsyncOpMsgDequeue(qpid::broker::EnqueueHandle& enqHandle,
+                      qpid::broker::TxnHandle& txnHandle,
+                      boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+    virtual ~AsyncOpMsgDequeue();
+    virtual void executeOp(boost::shared_ptr<AsyncStoreImpl> store);
+    virtual const char* getOpStr() const;
+private:
+    qpid::broker::EnqueueHandle& m_enqHandle;
+    qpid::broker::TxnHandle& m_txnHandle;
+};
+
 }} // namespace qpid::asyncStore
 
 #endif // qpid_asyncStore_AsyncOperation_h_

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp Fri Jul 20 12:55:20 2012
@@ -23,6 +23,7 @@
 
 #include "AsyncStoreImpl.h"
 
+#include "AsyncOperation.h"
 #include "ConfigHandleImpl.h"
 #include "EnqueueHandleImpl.h"
 #include "EventHandleImpl.h"
@@ -37,6 +38,8 @@
 #include "qpid/broker/QueueHandle.h"
 #include "qpid/broker/TxnHandle.h"
 
+//#include <boost/make_shared.hpp>
+
 namespace qpid {
 namespace asyncStore {
 
@@ -94,9 +97,8 @@ void
 AsyncStoreImpl::submitPrepare(qpid::broker::TxnHandle& txnHandle,
                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_PREPARE,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&txnHandle),
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnPrepare(txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -104,9 +106,8 @@ void
 AsyncStoreImpl::submitCommit(qpid::broker::TxnHandle& txnHandle,
                              boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_COMMIT,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&txnHandle),
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnCommit(txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -114,9 +115,8 @@ void
 AsyncStoreImpl::submitAbort(qpid::broker::TxnHandle& txnHandle,
                             boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_ABORT,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&txnHandle),
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnAbort(txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -161,10 +161,8 @@ AsyncStoreImpl::submitCreate(qpid::broke
                              const qpid::broker::DataSource* const dataSrc,
                              boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::CONFIG_CREATE,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&cfgHandle),
-                                                                  dataSrc,
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpConfigCreate(cfgHandle, dataSrc, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -172,9 +170,8 @@ void
 AsyncStoreImpl::submitDestroy(qpid::broker::ConfigHandle& cfgHandle,
                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::CONFIG_DESTROY,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&cfgHandle),
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpConfigDestroy(cfgHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -183,10 +180,8 @@ AsyncStoreImpl::submitCreate(qpid::broke
                              const qpid::broker::DataSource* const dataSrc,
                              boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::QUEUE_CREATE,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&queueHandle),
-                                                                  dataSrc,
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueCreate(queueHandle, dataSrc, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -194,9 +189,8 @@ void
 AsyncStoreImpl::submitDestroy(qpid::broker::QueueHandle& queueHandle,
                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::QUEUE_DESTROY,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&queueHandle),
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueDestroy(queueHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -204,9 +198,8 @@ void
 AsyncStoreImpl::submitFlush(qpid::broker::QueueHandle& queueHandle,
                             boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::QUEUE_FLUSH,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&queueHandle),
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueFlush(queueHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -216,11 +209,8 @@ AsyncStoreImpl::submitCreate(qpid::broke
                              qpid::broker::TxnHandle& txnHandle,
                              boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::EVENT_CREATE,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&eventHandle),
-                                                                  dataSrc,
-                                                                  &txnHandle,
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpEventCreate(eventHandle, dataSrc, txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -229,10 +219,8 @@ AsyncStoreImpl::submitDestroy(qpid::brok
                               qpid::broker::TxnHandle& txnHandle,
                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::EVENT_DESTROY,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&eventHandle),
-                                                                  &txnHandle,
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpEventDestroy(eventHandle, txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -241,10 +229,8 @@ AsyncStoreImpl::submitEnqueue(qpid::brok
                               qpid::broker::TxnHandle& txnHandle,
                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::MSG_ENQUEUE,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&enqHandle),
-                                                                  &txnHandle,
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgEnqueue(enqHandle, txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 
@@ -253,10 +239,8 @@ AsyncStoreImpl::submitDequeue(qpid::brok
                               qpid::broker::TxnHandle& txnHandle,
                               boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
 {
-    boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::MSG_DEQUEUE,
-                                                                  dynamic_cast<AsyncStoreHandle*>(&enqHandle),
-                                                                  &txnHandle,
-                                                                  brokerCtxt));
+    boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgDequeue(enqHandle, txnHandle, brokerCtxt));
+    brokerCtxt->setOpStr(op->getOpStr());
     m_operations.submit(op);
 }
 

Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp Fri Jul 20 12:55:20 2012
@@ -54,7 +54,7 @@ OperationQueue::handle(const OperationQu
     try {
         for (OpQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) {
             boost::shared_ptr<qpid::broker::BrokerAsyncContext> bc = (*i)->getBrokerContext();
-            if (bc) {
+            if (bc.get()) {
                 qpid::broker::AsyncResultQueue* const arq = bc->getAsyncResultQueue();
                 if (arq) {
                     qpid::broker::AsyncResultHandleImpl* arhi = new qpid::broker::AsyncResultHandleImpl(bc);

Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.h?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.h Fri Jul 20 12:55:20 2012
@@ -26,7 +26,6 @@
 
 #include "AsyncOperation.h"
 
-//#include "qpid/broker/AsyncStore.h"
 #include "qpid/sys/PollableQueue.h"
 
 namespace qpid {
@@ -43,6 +42,7 @@ private:
     typedef qpid::sys::PollableQueue<boost::shared_ptr<const AsyncOperation> > OpQueue;
     OpQueue m_opQueue;
 
+    // Callback function for pollable queue, defined in qpid::sys::PollableQueue
     OpQueue::Batch::const_iterator handle(const OpQueue::Batch& e);
 };
 

Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.h?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.h Fri Jul 20 12:55:20 2012
@@ -44,6 +44,7 @@ private:
     typedef qpid::sys::PollableQueue<boost::shared_ptr<const AsyncResultHandle> > ResultQueue;
     ResultQueue m_resQueue;
 
+    // Callback function for pollable queue, defined in qpid::sys::PollableQueue
     ResultQueue::Batch::const_iterator handle(const ResultQueue::Batch& e);
 };
 

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncStore.h Fri Jul 20 12:55:20 2012
@@ -46,6 +46,10 @@ public:
     virtual ~BrokerAsyncContext() {}
     virtual AsyncResultQueue* getAsyncResultQueue() const = 0;
     virtual void invokeCallback(const AsyncResultHandle* const) const = 0;
+    void setOpStr(const char* opStr) { m_opStr = opStr; }
+    const char* getOpStr() const { return m_opStr; }
+private:
+    const char* m_opStr;
 };
 
 class DataSource {
@@ -83,6 +87,7 @@ public:
                               boost::shared_ptr<BrokerAsyncContext>) = 0;
     virtual void submitAbort(TxnHandle&,
                              boost::shared_ptr<BrokerAsyncContext>) = 0;
+    void testOp() const {}
 };
 
 // Subclassed by store:

Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp Fri Jul 20 12:55:20 2012
@@ -27,13 +27,9 @@ namespace qpid {
 namespace broker {
 
 TxnAsyncContext::TxnAsyncContext(TxnBuffer* const tb,
-                                 TxnHandle& th,
-                                 const qpid::asyncStore::AsyncOperation::opCode op,
-                                 qpid::broker::AsyncResultCallback rcb,
-                                 qpid::broker::AsyncResultQueue* const arq):
+                                 AsyncResultCallback rcb,
+                                 AsyncResultQueue* const arq):
         m_tb(tb),
-        m_th(th),
-        m_op(op),
         m_rcb(rcb),
         m_arq(arq)
 {}
@@ -47,24 +43,6 @@ TxnAsyncContext::getTxnBuffer() const
     return m_tb;
 }
 
-qpid::asyncStore::AsyncOperation::opCode
-TxnAsyncContext::getOpCode() const
-{
-    return m_op;
-}
-
-const char*
-TxnAsyncContext::getOpStr() const
-{
-    return qpid::asyncStore::AsyncOperation::getOpStr(m_op);
-}
-
-TxnHandle&
-TxnAsyncContext::getTransactionContext() const
-{
-    return m_th;
-}
-
 AsyncResultQueue*
 TxnAsyncContext::getAsyncResultQueue() const
 {

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.h Fri Jul 20 12:55:20 2012
@@ -29,6 +29,9 @@
 #include "qpid/asyncStore/AsyncOperation.h"
 
 namespace qpid {
+namespace asyncStore {
+class AsyncOperation;
+}
 namespace broker {
 
 class TxnHandle;
@@ -39,15 +42,10 @@ class TxnAsyncContext: public BrokerAsyn
 {
 public:
     TxnAsyncContext(TxnBuffer* const tb,
-                    TxnHandle& th,
-                    const qpid::asyncStore::AsyncOperation::opCode op,
-                    qpid::broker::AsyncResultCallback rcb,
-                    qpid::broker::AsyncResultQueue* const arq);
+                    AsyncResultCallback rcb,
+                    AsyncResultQueue* const arq);
     virtual ~TxnAsyncContext();
     TxnBuffer* getTxnBuffer() const;
-    qpid::asyncStore::AsyncOperation::opCode getOpCode() const;
-    const char* getOpStr() const;
-    TxnHandle& getTransactionContext() const;
 
     // --- Interface BrokerAsyncContext ---
     AsyncResultQueue* getAsyncResultQueue() const;
@@ -55,8 +53,6 @@ public:
 
 private:
     TxnBuffer* const m_tb;
-    TxnHandle& m_th;
-    const qpid::asyncStore::AsyncOperation::opCode m_op;
     AsyncResultCallback m_rcb;
     AsyncResultQueue* const m_arq;
 };

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.cpp Fri Jul 20 12:55:20 2012
@@ -96,26 +96,6 @@ TxnBuffer::commitLocal(AsyncTransaction*
     return false;
 }
 
-// static
-void
-TxnBuffer::handleAsyncResult(const AsyncResultHandle* const arh)
-{
-    if (arh) {
-        boost::shared_ptr<TxnAsyncContext> tac = boost::dynamic_pointer_cast<TxnAsyncContext>(arh->getBrokerAsyncContext());
-        if (arh->getErrNo()) {
-            QPID_LOG(error, "TxnBuffer::handleAsyncResult: Transactional operation " << tac->getOpStr() << " failed: err=" << arh->getErrNo()
-                    << " (" << arh->getErrMsg() << ")");
-            tac->getTxnBuffer()->asyncLocalAbort();
-        } else {
-            if (tac->getOpCode() == qpid::asyncStore::AsyncOperation::TXN_ABORT) {
-                tac->getTxnBuffer()->asyncLocalAbort();
-            } else {
-                tac->getTxnBuffer()->asyncLocalCommit();
-            }
-        }
-    }
-}
-
 void
 TxnBuffer::asyncLocalCommit()
 {
@@ -130,10 +110,9 @@ TxnBuffer::asyncLocalCommit()
         m_state = COMMIT;
         {
             boost::shared_ptr<TxnAsyncContext> tac(new TxnAsyncContext(this,
-                                                                       m_txnHandle,
-                                                                       qpid::asyncStore::AsyncOperation::TXN_COMMIT,
-                                                                       &handleAsyncResult,
+                                                                       &handleAsyncCommitResult,
                                                                        &m_resultQueue));
+            m_store->testOp();
             m_store->submitCommit(m_txnHandle, tac);
         }
         break;
@@ -147,6 +126,21 @@ TxnBuffer::asyncLocalCommit()
     }
 }
 
+//static
+void
+TxnBuffer::handleAsyncCommitResult(const AsyncResultHandle* const arh) {
+    if (arh) {
+        boost::shared_ptr<TxnAsyncContext> tac = boost::dynamic_pointer_cast<TxnAsyncContext>(arh->getBrokerAsyncContext());
+        if (arh->getErrNo()) {
+            QPID_LOG(error, "TxnBuffer::handleAsyncCommitResult: Transactional operation " << tac->getOpStr() << " failed: err=" << arh->getErrNo()
+                    << " (" << arh->getErrMsg() << ")");
+            tac->getTxnBuffer()->asyncLocalAbort();
+        } else {
+            tac->getTxnBuffer()->asyncLocalCommit();
+        }
+    }
+}
+
 void
 TxnBuffer::asyncLocalAbort()
 {
@@ -158,9 +152,7 @@ TxnBuffer::asyncLocalAbort()
         m_state = ROLLBACK;
         {
             boost::shared_ptr<TxnAsyncContext> tac(new TxnAsyncContext(this,
-                                                                       m_txnHandle,
-                                                                       qpid::asyncStore::AsyncOperation::TXN_ABORT,
-                                                                       &handleAsyncResult,
+                                                                       &handleAsyncAbortResult,
                                                                        &m_resultQueue));
             m_store->submitCommit(m_txnHandle, tac);
         }
@@ -173,4 +165,17 @@ TxnBuffer::asyncLocalAbort()
     }
 }
 
+//static
+void
+TxnBuffer::handleAsyncAbortResult(const AsyncResultHandle* const arh) {
+    if (arh) {
+        boost::shared_ptr<TxnAsyncContext> tac = boost::dynamic_pointer_cast<TxnAsyncContext>(arh->getBrokerAsyncContext());
+        if (arh->getErrNo()) {
+            QPID_LOG(error, "TxnBuffer::handleAsyncAbortResult: Transactional operation " << tac->getOpStr() << " failed: err=" << arh->getErrNo()
+                    << " (" << arh->getErrMsg() << ")");
+        }
+        tac->getTxnBuffer()->asyncLocalAbort();
+    }
+}
+
 }} // namespace qpid::broker

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=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnBuffer.h Fri Jul 20 12:55:20 2012
@@ -51,9 +51,10 @@ public:
     bool commitLocal(AsyncTransaction* const store);
 
     // --- Async operations ---
-    static void handleAsyncResult(const AsyncResultHandle* const arh);
     void asyncLocalCommit();
+    static void handleAsyncCommitResult(const AsyncResultHandle* const arh);
     void asyncLocalAbort();
+    static void handleAsyncAbortResult(const AsyncResultHandle* const arh);
 
 private:
     std::vector<boost::shared_ptr<TxnOp> > m_ops;

Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.cpp?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.cpp Fri Jul 20 12:55:20 2012
@@ -32,10 +32,8 @@ namespace storePerftools {
 namespace asyncPerf {
 
 MessageAsyncContext::MessageAsyncContext(boost::intrusive_ptr<SimpleMessage> msg,
-                                         const qpid::asyncStore::AsyncOperation::opCode op,
                                          boost::shared_ptr<SimpleQueue> q) :
         m_msg(msg),
-        m_op(op),
         m_q(q)
 {
     assert(m_msg.get() != 0);
@@ -45,18 +43,6 @@ MessageAsyncContext::MessageAsyncContext
 MessageAsyncContext::~MessageAsyncContext()
 {}
 
-qpid::asyncStore::AsyncOperation::opCode
-MessageAsyncContext::getOpCode() const
-{
-    return m_op;
-}
-
-const char*
-MessageAsyncContext::getOpStr() const
-{
-    return qpid::asyncStore::AsyncOperation::getOpStr(m_op);
-}
-
 boost::intrusive_ptr<SimpleMessage>
 MessageAsyncContext::getMessage() const
 {

Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.h?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageAsyncContext.h Fri Jul 20 12:55:20 2012
@@ -40,18 +40,14 @@ class MessageAsyncContext : public qpid:
 {
 public:
     MessageAsyncContext(boost::intrusive_ptr<SimpleMessage> msg,
-                        const qpid::asyncStore::AsyncOperation::opCode op,
                         boost::shared_ptr<SimpleQueue> q);
     virtual ~MessageAsyncContext();
-    qpid::asyncStore::AsyncOperation::opCode getOpCode() const;
-    const char* getOpStr() const;
     boost::intrusive_ptr<SimpleMessage> getMessage() const;
     boost::shared_ptr<SimpleQueue> getQueue() const;
     void destroy();
 
 private:
     boost::intrusive_ptr<SimpleMessage> m_msg;
-    const qpid::asyncStore::AsyncOperation::opCode m_op;
     boost::shared_ptr<SimpleQueue> m_q;
 };
 

Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.cpp?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.cpp Fri Jul 20 12:55:20 2012
@@ -33,12 +33,10 @@ namespace asyncPerf {
 
 QueueAsyncContext::QueueAsyncContext(boost::shared_ptr<SimpleQueue> q,
                                      qpid::broker::TxnHandle& th,
-                                     const qpid::asyncStore::AsyncOperation::opCode op,
                                      qpid::broker::AsyncResultCallback rcb,
                                      qpid::broker::AsyncResultQueue* const arq) :
         m_q(q),
         m_th(th),
-        m_op(op),
         m_rcb(rcb),
         m_arq(arq)
 {
@@ -48,13 +46,11 @@ QueueAsyncContext::QueueAsyncContext(boo
 QueueAsyncContext::QueueAsyncContext(boost::shared_ptr<SimpleQueue> q,
                                      boost::intrusive_ptr<SimpleMessage> msg,
                                      qpid::broker::TxnHandle& th,
-                                     const qpid::asyncStore::AsyncOperation::opCode op,
                                      qpid::broker::AsyncResultCallback rcb,
                                      qpid::broker::AsyncResultQueue* const arq) :
         m_q(q),
         m_msg(msg),
         m_th(th),
-        m_op(op),
         m_rcb(rcb),
         m_arq(arq)
 {
@@ -65,18 +61,6 @@ QueueAsyncContext::QueueAsyncContext(boo
 QueueAsyncContext::~QueueAsyncContext()
 {}
 
-qpid::asyncStore::AsyncOperation::opCode
-QueueAsyncContext::getOpCode() const
-{
-    return m_op;
-}
-
-const char*
-QueueAsyncContext::getOpStr() const
-{
-    return qpid::asyncStore::AsyncOperation::getOpStr(m_op);
-}
-
 boost::shared_ptr<SimpleQueue>
 QueueAsyncContext::getQueue() const
 {

Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.h?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/QueueAsyncContext.h Fri Jul 20 12:55:20 2012
@@ -49,18 +49,14 @@ class QueueAsyncContext: public qpid::br
 public:
     QueueAsyncContext(boost::shared_ptr<SimpleQueue> q,
                       qpid::broker::TxnHandle& th,
-                      const qpid::asyncStore::AsyncOperation::opCode op,
                       qpid::broker::AsyncResultCallback rcb,
                       qpid::broker::AsyncResultQueue* const arq);
     QueueAsyncContext(boost::shared_ptr<SimpleQueue> q,
                       boost::intrusive_ptr<SimpleMessage> msg,
                       qpid::broker::TxnHandle& th,
-                      const qpid::asyncStore::AsyncOperation::opCode op,
                       qpid::broker::AsyncResultCallback rcb,
                       qpid::broker::AsyncResultQueue* const arq);
     virtual ~QueueAsyncContext();
-    qpid::asyncStore::AsyncOperation::opCode getOpCode() const;
-    const char* getOpStr() const;
     boost::shared_ptr<SimpleQueue> getQueue() const;
     boost::intrusive_ptr<SimpleMessage> getMessage() const;
     qpid::broker::TxnHandle getTxnHandle() const;
@@ -72,8 +68,7 @@ public:
 private:
     boost::shared_ptr<SimpleQueue> m_q;
     boost::intrusive_ptr<SimpleMessage> m_msg;
-    qpid::broker::TxnHandle m_th;
-    const qpid::asyncStore::AsyncOperation::opCode m_op;
+    qpid::broker::TxnHandle m_th; // TODO: get rid of this
     qpid::broker::AsyncResultCallback m_rcb;
     qpid::broker::AsyncResultQueue* const m_arq;
 };

Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp Fri Jul 20 12:55:20 2012
@@ -33,7 +33,6 @@
 #include "qpid/broker/AsyncResultHandle.h"
 #include "qpid/broker/TxnHandle.h"
 
-#include <boost/make_shared.hpp>
 #include <string.h> // memcpy()
 
 namespace tests {
@@ -69,43 +68,6 @@ SimpleQueue::SimpleQueue(const std::stri
 SimpleQueue::~SimpleQueue()
 {}
 
-// static
-void
-SimpleQueue::handleAsyncResult(const qpid::broker::AsyncResultHandle* const arh)
-{
-    if (arh) {
-        boost::shared_ptr<QueueAsyncContext> qc = boost::dynamic_pointer_cast<QueueAsyncContext>(arh->getBrokerAsyncContext());
-        if (arh->getErrNo()) {
-            // TODO: Handle async failure here (other than by simply printing a message)
-            std::cerr << "Queue name=\"" << qc->getQueue()->m_name << "\": Operation " << qc->getOpStr() << ": failure "
-                      << arh->getErrNo() << " (" << arh->getErrMsg() << ")" << std::endl;
-        } else {
-            // Handle async success here
-            switch(qc->getOpCode()) {
-            case qpid::asyncStore::AsyncOperation::QUEUE_CREATE:
-                qc->getQueue()->createComplete(qc);
-                break;
-            case qpid::asyncStore::AsyncOperation::QUEUE_FLUSH:
-                qc->getQueue()->flushComplete(qc);
-                break;
-            case qpid::asyncStore::AsyncOperation::QUEUE_DESTROY:
-                qc->getQueue()->destroyComplete(qc);
-                break;
-            case qpid::asyncStore::AsyncOperation::MSG_ENQUEUE:
-                qc->getQueue()->enqueueComplete(qc);
-                break;
-            case qpid::asyncStore::AsyncOperation::MSG_DEQUEUE:
-                qc->getQueue()->dequeueComplete(qc);
-                break;
-            default:
-                std::ostringstream oss;
-                oss << "tests::storePerftools::asyncPerf::SimpleQueue::handleAsyncResult(): Unknown async queue operation: " << qc->getOpCode();
-                throw qpid::Exception(oss.str());
-            };
-        }
-    }
-}
-
 const qpid::broker::QueueHandle&
 SimpleQueue::getHandle() const
 {
@@ -130,16 +92,28 @@ SimpleQueue::asyncCreate()
     if (m_store) {
         boost::shared_ptr<QueueAsyncContext> qac(new QueueAsyncContext(shared_from_this(),
                                                                        s_nullTxnHandle,
-                                                                       qpid::asyncStore::AsyncOperation::QUEUE_CREATE,
-                                                                       &handleAsyncResult,
+                                                                       &handleAsyncCreateResult,
                                                                        &m_resultQueue));
-        m_store->submitCreate(m_queueHandle,
-                              this,
-                              qac);
+        m_store->submitCreate(m_queueHandle, this, qac);
         ++m_asyncOpCounter;
     }
 }
 
+//static
+void
+SimpleQueue::handleAsyncCreateResult(const qpid::broker::AsyncResultHandle* const arh) {
+    if (arh) {
+        boost::shared_ptr<QueueAsyncContext> qc = boost::dynamic_pointer_cast<QueueAsyncContext>(arh->getBrokerAsyncContext());
+        if (arh->getErrNo()) {
+            // TODO: Handle async failure here (other than by simply printing a message)
+            std::cerr << "Queue name=\"" << qc->getQueue()->m_name << "\": Operation " << qc->getOpStr() << ": failure "
+                      << arh->getErrNo() << " (" << arh->getErrMsg() << ")" << std::endl;
+        } else {
+            qc->getQueue()->createComplete(qc);
+        }
+    }
+}
+
 void
 SimpleQueue::asyncDestroy(const bool deleteQueue)
 {
@@ -148,25 +122,38 @@ SimpleQueue::asyncDestroy(const bool del
         if (deleteQueue) {
             boost::shared_ptr<QueueAsyncContext> qac(new QueueAsyncContext(shared_from_this(),
                                                                            s_nullTxnHandle,
-                                                                           qpid::asyncStore::AsyncOperation::QUEUE_DESTROY,
-                                                                           &handleAsyncResult,
+                                                                           &handleAsyncDestroyResult,
                                                                            &m_resultQueue));
-            m_store->submitDestroy(m_queueHandle,
-                                   qac);
+            m_store->submitDestroy(m_queueHandle, qac);
             ++m_asyncOpCounter;
         }
         m_asyncOpCounter.waitForZero(qpid::sys::Duration(10UL*1000*1000*1000));
     }
 }
 
+//static
+void
+SimpleQueue::handleAsyncDestroyResult(const qpid::broker::AsyncResultHandle* const arh) {
+    if (arh) {
+        boost::shared_ptr<QueueAsyncContext> qc = boost::dynamic_pointer_cast<QueueAsyncContext>(arh->getBrokerAsyncContext());
+        if (arh->getErrNo()) {
+            // TODO: Handle async failure here (other than by simply printing a message)
+            std::cerr << "Queue name=\"" << qc->getQueue()->m_name << "\": Operation " << qc->getOpStr() << ": failure "
+                      << arh->getErrNo() << " (" << arh->getErrMsg() << ")" << std::endl;
+        } else {
+            qc->getQueue()->destroyComplete(qc);
+        }
+    }
+}
+
 void
 SimpleQueue::deliver(boost::intrusive_ptr<SimpleMessage> msg)
 {
     boost::shared_ptr<QueuedMessage> qm;
     if (msg->isPersistent() && m_store) {
-        qm = boost::make_shared<PersistableQueuedMessage>(new PersistableQueuedMessage(this, msg));
+        qm = boost::shared_ptr<PersistableQueuedMessage>(new PersistableQueuedMessage(this, msg));
     } else {
-        qm = boost::make_shared<QueuedMessage>(new QueuedMessage(this, msg));
+        qm = boost::shared_ptr<QueuedMessage>(new QueuedMessage(this, msg));
     }
     enqueue(s_nullTxnHandle, qm);
     push(qm);
@@ -231,9 +218,9 @@ SimpleQueue::process(boost::intrusive_pt
 {
     boost::shared_ptr<QueuedMessage> qm;
     if (msg->isPersistent() && m_store) {
-        qm = boost::make_shared<PersistableQueuedMessage>(new PersistableQueuedMessage(this, msg));
+        qm = boost::shared_ptr<PersistableQueuedMessage>(new PersistableQueuedMessage(this, msg));
     } else {
-        qm = boost::make_shared<QueuedMessage>(new QueuedMessage(this, msg));
+        qm = boost::shared_ptr<QueuedMessage>(new QueuedMessage(this, msg));
     }
     push(qm);
 }
@@ -357,9 +344,6 @@ void
 SimpleQueue::push(boost::shared_ptr<QueuedMessage> qm,
                   bool /*isRecovery*/)
 {
-boost::shared_ptr<PersistableQueuedMessage> pqm = boost::dynamic_pointer_cast<PersistableQueuedMessage>(qm);
-assert(pqm.get());
-
     m_messages->push(qm);
 }
 
@@ -375,8 +359,7 @@ SimpleQueue::asyncEnqueue(qpid::broker::
     boost::shared_ptr<QueueAsyncContext> qac(new QueueAsyncContext(shared_from_this(),
                                                                    pqm->payload(),
                                                                    th,
-                                                                   qpid::asyncStore::AsyncOperation::MSG_ENQUEUE,
-                                                                   &handleAsyncResult,
+                                                                   &handleAsyncEnqueueResult,
                                                                    &m_resultQueue));
     // TODO : This must be done from inside store, not here
     if (th.isValid()) {
@@ -389,6 +372,21 @@ SimpleQueue::asyncEnqueue(qpid::broker::
     return true;
 }
 
+// private static
+void
+SimpleQueue::handleAsyncEnqueueResult(const qpid::broker::AsyncResultHandle* const arh) {
+    if (arh) {
+        boost::shared_ptr<QueueAsyncContext> qc = boost::dynamic_pointer_cast<QueueAsyncContext>(arh->getBrokerAsyncContext());
+        if (arh->getErrNo()) {
+            // TODO: Handle async failure here (other than by simply printing a message)
+            std::cerr << "Queue name=\"" << qc->getQueue()->m_name << "\": Operation " << qc->getOpStr() << ": failure "
+                      << arh->getErrNo() << " (" << arh->getErrMsg() << ")" << std::endl;
+        } else {
+            qc->getQueue()->enqueueComplete(qc);
+        }
+    }
+}
+
 // private
 bool
 SimpleQueue::asyncDequeue(qpid::broker::TxnHandle& th,
@@ -398,8 +396,7 @@ SimpleQueue::asyncDequeue(qpid::broker::
     boost::shared_ptr<QueueAsyncContext> qac(new QueueAsyncContext(shared_from_this(),
                                                                    pqm->payload(),
                                                                    th,
-                                                                   qpid::asyncStore::AsyncOperation::MSG_DEQUEUE,
-                                                                   &handleAsyncResult,
+                                                                   &handleAsyncDequeueResult,
                                                                    &m_resultQueue));
     // TODO : This must be done from inside store, not here
     if (th.isValid()) {
@@ -411,6 +408,20 @@ SimpleQueue::asyncDequeue(qpid::broker::
     ++m_asyncOpCounter;
     return true;
 }
+// private static
+void
+SimpleQueue::handleAsyncDequeueResult(const qpid::broker::AsyncResultHandle* const arh) {
+    if (arh) {
+        boost::shared_ptr<QueueAsyncContext> qc = boost::dynamic_pointer_cast<QueueAsyncContext>(arh->getBrokerAsyncContext());
+        if (arh->getErrNo()) {
+            // TODO: Handle async failure here (other than by simply printing a message)
+            std::cerr << "Queue name=\"" << qc->getQueue()->m_name << "\": Operation " << qc->getOpStr() << ": failure "
+                      << arh->getErrNo() << " (" << arh->getErrMsg() << ")" << std::endl;
+        } else {
+            qc->getQueue()->dequeueComplete(qc);
+        }
+    }
+}
 
 // private
 void
@@ -455,9 +466,8 @@ SimpleQueue::enqueueComplete(const boost
     assert(qc->getQueue().get() == this);
     --m_asyncOpCounter;
 
-    qpid::broker::TxnHandle th = qc->getTxnHandle();
-
     // TODO : This must be done from inside store, not here
+    qpid::broker::TxnHandle th = qc->getTxnHandle();
     if (th.isValid()) { // transactional enqueue
         th.decrOpCnt();
     }
@@ -470,9 +480,8 @@ SimpleQueue::dequeueComplete(const boost
     assert(qc->getQueue().get() == this);
     --m_asyncOpCounter;
 
-    qpid::broker::TxnHandle th = qc->getTxnHandle();
-
     // TODO : This must be done from inside store, not here
+    qpid::broker::TxnHandle th = qc->getTxnHandle();
     if (th.isValid()) { // transactional enqueue
         th.decrOpCnt();
     }

Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h?rev=1363759&r1=1363758&r2=1363759&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h Fri Jul 20 12:55:20 2012
@@ -35,9 +35,6 @@
 #include <boost/enable_shared_from_this.hpp>
 
 namespace qpid {
-namespace asyncStore {
-//class AsyncStoreImpl;
-}
 namespace broker {
 class AsyncResultQueue;
 }
@@ -67,13 +64,14 @@ public:
                 qpid::broker::AsyncResultQueue& arq);
     virtual ~SimpleQueue();
 
-    static void handleAsyncResult(const qpid::broker::AsyncResultHandle* const res);
     const qpid::broker::QueueHandle& getHandle() const;
     qpid::broker::QueueHandle& getHandle();
     qpid::broker::AsyncStore* getStore();
 
     void asyncCreate();
+    static void handleAsyncCreateResult(const qpid::broker::AsyncResultHandle* const arh);
     void asyncDestroy(const bool deleteQueue);
+    static void handleAsyncDestroyResult(const qpid::broker::AsyncResultHandle* const arh);
 
     // --- Methods in msg handling path from qpid::Queue ---
     void deliver(boost::intrusive_ptr<SimpleMessage> msg);
@@ -98,7 +96,7 @@ public:
     virtual const std::string& getName() const;
     virtual void setExternalQueueStore(qpid::broker::ExternalQueueStore* inst);
 
-    // --- Interface DataStore ---
+    // --- Interface qpid::broker::DataStore ---
     virtual uint64_t getSize();
     virtual void write(char* target);
 
@@ -116,8 +114,7 @@ private:
     bool m_destroyed;
 
     // --- Members & methods in msg handling path copied from qpid::Queue ---
-    struct UsageBarrier
-    {
+    struct UsageBarrier {
         SimpleQueue& m_parent;
         uint32_t m_count;
         qpid::sys::Monitor m_monitor;
@@ -126,8 +123,7 @@ private:
         void release();
         void destroy();
     };
-    struct ScopedUse
-    {
+    struct ScopedUse {
         UsageBarrier& m_barrier;
         const bool m_acquired;
         ScopedUse(UsageBarrier& b);
@@ -141,8 +137,10 @@ private:
     // -- Async ops ---
     bool asyncEnqueue(qpid::broker::TxnHandle& th,
                       boost::shared_ptr<PersistableQueuedMessage> pqm);
+    static void handleAsyncEnqueueResult(const qpid::broker::AsyncResultHandle* const arh);
     bool asyncDequeue(qpid::broker::TxnHandle& th,
                       boost::shared_ptr<PersistableQueuedMessage> pqm);
+    static void handleAsyncDequeueResult(const qpid::broker::AsyncResultHandle* const arh);
 
     // --- Async op counter ---
     void destroyCheck(const std::string& opDescr) const;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org