From 2e437e1569009d8e8ed3ed896d751994e2e85d74 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Fri, 20 Jul 2012 12:55:20 +0000 Subject: QPID-3858: WIP: Created many async operation classes for each op instead of a single class with op codes. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1363759 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h') diff --git a/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h b/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h index 2763ae3159..f13febbafa 100644 --- a/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h +++ b/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h @@ -35,9 +35,6 @@ #include 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 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 pqm); + static void handleAsyncEnqueueResult(const qpid::broker::AsyncResultHandle* const arh); bool asyncDequeue(qpid::broker::TxnHandle& th, boost::shared_ptr pqm); + static void handleAsyncDequeueResult(const qpid::broker::AsyncResultHandle* const arh); // --- Async op counter --- void destroyCheck(const std::string& opDescr) const; -- cgit v1.2.1