summaryrefslogtreecommitdiff
path: root/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2012-07-20 12:55:20 +0000
committerKim van der Riet <kpvdr@apache.org>2012-07-20 12:55:20 +0000
commit2e437e1569009d8e8ed3ed896d751994e2e85d74 (patch)
tree28459e48638bfcd3a7e565c37165b3fab714d484 /cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h
parentc94c9b5333c06c03deb6a6dcb1a91ecdf111b481 (diff)
downloadqpid-python-2e437e1569009d8e8ed3ed896d751994e2e85d74.tar.gz
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
Diffstat (limited to 'cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h')
-rw-r--r--cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h16
1 files changed, 7 insertions, 9 deletions
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 <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;