From 172d9b2a16cfb817bbe632d050acba7e31401cd2 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Thu, 18 Oct 2012 13:37:42 +0000 Subject: WIP - async store interface working for configuration (adding and removing queues, links and exchanges) and for enqueues and dequeues of messages. Transactions are not yet included, and hence some tests will fail. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1399662 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/QueueAsyncContext.cpp | 52 ++++++++++++++----------------- 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'cpp/src/qpid/broker/QueueAsyncContext.cpp') diff --git a/cpp/src/qpid/broker/QueueAsyncContext.cpp b/cpp/src/qpid/broker/QueueAsyncContext.cpp index 1bad5387a3..24ecaf6b5d 100644 --- a/cpp/src/qpid/broker/QueueAsyncContext.cpp +++ b/cpp/src/qpid/broker/QueueAsyncContext.cpp @@ -33,67 +33,67 @@ QueueAsyncContext::QueueAsyncContext(boost::shared_ptr q, AsyncResultCallback rcb, AsyncResultQueue* const arq) : m_q(q), + m_pmsg(0), + m_tb(0), m_rcb(rcb), m_arq(arq) -{} +{ + //assert(m_q.get() != 0); +} -/* QueueAsyncContext::QueueAsyncContext(boost::shared_ptr q, boost::intrusive_ptr msg, AsyncResultCallback rcb, AsyncResultQueue* const arq) : m_q(q), - m_msg(msg), + m_pmsg(msg), + m_tb(0), m_rcb(rcb), m_arq(arq) -{} -*/ +{ + //assert(m_q.get() != 0); + //assert(m_pmsg.get() != 0); +} QueueAsyncContext::QueueAsyncContext(boost::shared_ptr q, SimpleTxnBuffer* tb, AsyncResultCallback rcb, AsyncResultQueue* const arq) : m_q(q), + m_pmsg(0), m_tb(tb), m_rcb(rcb), m_arq(arq) { - assert(m_q.get() != 0); + //assert(m_q.get() != 0); } -/* QueueAsyncContext::QueueAsyncContext(boost::shared_ptr q, boost::intrusive_ptr msg, SimpleTxnBuffer* tb, AsyncResultCallback rcb, AsyncResultQueue* const arq) : m_q(q), - m_msg(msg), + m_pmsg(msg), m_tb(tb), m_rcb(rcb), m_arq(arq) { - assert(m_q.get() != 0); - assert(m_msg.get() != 0); + //assert(m_q.get() != 0); + //assert(m_pmsg.get() != 0); } -*/ -QueueAsyncContext::~QueueAsyncContext() -{} +QueueAsyncContext::~QueueAsyncContext() {} boost::shared_ptr -QueueAsyncContext::getQueue() const -{ +QueueAsyncContext::getQueue() const { return m_q; } -/* boost::intrusive_ptr -QueueAsyncContext::getMessage() const -{ - return m_msg; +QueueAsyncContext::getMessage() const { + return m_pmsg; } -*/ SimpleTxnBuffer* QueueAsyncContext::getTxnBuffer() const { @@ -101,28 +101,24 @@ QueueAsyncContext::getTxnBuffer() const { } AsyncResultQueue* -QueueAsyncContext::getAsyncResultQueue() const -{ +QueueAsyncContext::getAsyncResultQueue() const { return m_arq; } AsyncResultCallback -QueueAsyncContext::getAsyncResultCallback() const -{ +QueueAsyncContext::getAsyncResultCallback() const { return m_rcb; } void -QueueAsyncContext::invokeCallback(const AsyncResultHandle* const arh) const -{ +QueueAsyncContext::invokeCallback(const AsyncResultHandle* const arh) const { if (m_rcb) { m_rcb(arh); } } void -QueueAsyncContext::destroy() -{ +QueueAsyncContext::destroy() { delete this; } -- cgit v1.2.1