diff options
author | Kim van der Riet <kpvdr@apache.org> | 2012-07-16 13:54:11 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2012-07-16 13:54:11 +0000 |
commit | a804510d81ade0594a75b5c9b8765cafcc233245 (patch) | |
tree | 8c6be643564b6d8c88619d17de7150c98a314781 /cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h | |
parent | 1ab07197127e990da2c765ea0ffa5fd8ca47b7b6 (diff) | |
download | qpid-python-a804510d81ade0594a75b5c9b8765cafcc233245.tar.gz |
QPID-3858: Refactor to tidy up several class design issues
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1362039 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h')
-rw-r--r-- | cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h b/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h index 59e12b5c93..81ea8b022b 100644 --- a/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h +++ b/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.h @@ -40,7 +40,6 @@ class AsyncStoreImpl; } namespace broker { class AsyncResultQueue; -class TxnHandle; } namespace framing { class FieldTable; @@ -52,9 +51,10 @@ namespace asyncPerf { class MessageConsumer; class Messages; -class SimpleMessage; +class PersistableQueuedMessage; class QueueAsyncContext; class QueuedMessage; +class SimpleMessage; class SimpleQueue : public boost::enable_shared_from_this<SimpleQueue>, public qpid::broker::PersistableQueue, @@ -63,14 +63,14 @@ class SimpleQueue : public boost::enable_shared_from_this<SimpleQueue>, public: SimpleQueue(const std::string& name, const qpid::framing::FieldTable& args, - qpid::asyncStore::AsyncStoreImpl* store, + qpid::broker::AsyncStore* store, 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::asyncStore::AsyncStoreImpl* getStore(); + qpid::broker::AsyncStore* getStore(); void asyncCreate(); void asyncDestroy(const bool deleteQueue); @@ -78,12 +78,12 @@ public: // --- Methods in msg handling path from qpid::Queue --- void deliver(boost::intrusive_ptr<SimpleMessage> msg); bool dispatch(MessageConsumer& mc); - bool enqueue(QueuedMessage& qm); + bool enqueue(boost::shared_ptr<QueuedMessage> qm); bool enqueue(qpid::broker::TxnHandle& th, - QueuedMessage& qm); - bool dequeue(QueuedMessage& qm); + boost::shared_ptr<QueuedMessage> qm); + bool dequeue(boost::shared_ptr<QueuedMessage> qm); bool dequeue(qpid::broker::TxnHandle& th, - QueuedMessage& qm); + boost::shared_ptr<QueuedMessage> qm); void process(boost::intrusive_ptr<SimpleMessage> msg); void enqueueAborted(boost::intrusive_ptr<SimpleMessage> msg); @@ -106,9 +106,9 @@ private: static qpid::broker::TxnHandle s_nullTxnHandle; // used for non-txn operations const std::string m_name; - qpid::asyncStore::AsyncStoreImpl* m_store; + qpid::broker::AsyncStore* m_store; qpid::broker::AsyncResultQueue& m_resultQueue; - qpid::asyncStore::AsyncOpCounter m_asyncOpCounter; + qpid::asyncStore::AsyncOpCounter m_asyncOpCounter; // TODO: change this to non-async store counter! mutable uint64_t m_persistenceId; std::string m_persistableData; qpid::broker::QueueHandle m_queueHandle; @@ -135,14 +135,14 @@ private: }; UsageBarrier m_barrier; std::auto_ptr<Messages> m_messages; - void push(QueuedMessage& qm, + void push(boost::shared_ptr<QueuedMessage> qm, bool isRecovery = false); // -- Async ops --- bool asyncEnqueue(qpid::broker::TxnHandle& th, - QueuedMessage& qm); + boost::shared_ptr<PersistableQueuedMessage> pqm); bool asyncDequeue(qpid::broker::TxnHandle& th, - QueuedMessage& qm); + boost::shared_ptr<PersistableQueuedMessage> pqm); // --- Async op counter --- void destroyCheck(const std::string& opDescr) const; |