summaryrefslogtreecommitdiff
path: root/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp')
-rw-r--r--cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp b/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp
index d8b312f011..8bb79367ed 100644
--- a/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp
+++ b/cpp/src/tests/storePerftools/asyncPerf/SimpleQueue.cpp
@@ -23,6 +23,8 @@
#include "SimpleQueue.h"
+#include "DeliveryRecord.h"
+#include "MessageConsumer.h"
#include "MessageDeque.h"
#include "SimpleMessage.h"
#include "QueueAsyncContext.h"
@@ -63,12 +65,7 @@ SimpleQueue::SimpleQueue(const std::string& name,
}
SimpleQueue::~SimpleQueue()
-{
-// m_store->flush(*this);
- // TODO: Make destroying the store a test parameter
-// m_store->destroy(*this);
-// m_store = 0;
-}
+{}
// static
void
@@ -170,16 +167,24 @@ SimpleQueue::deliver(boost::intrusive_ptr<SimpleMessage> msg)
}
bool
-SimpleQueue::dispatch()
+SimpleQueue::dispatch(MessageConsumer& mc)
{
QueuedMessage qm;
if (m_messages->consume(qm)) {
- return dequeue(s_nullTxnHandle, qm);
+ boost::shared_ptr<DeliveryRecord> dr(new DeliveryRecord(qm, mc, false));
+ mc.record(dr);
+ return true;
}
return false;
}
bool
+SimpleQueue::enqueue(QueuedMessage& qm)
+{
+ return enqueue(s_nullTxnHandle, qm);
+}
+
+bool
SimpleQueue::enqueue(qpid::broker::TxnHandle& th,
QueuedMessage& qm)
{
@@ -195,6 +200,12 @@ SimpleQueue::enqueue(qpid::broker::TxnHandle& th,
}
bool
+SimpleQueue::dequeue(QueuedMessage& qm)
+{
+ return dequeue(s_nullTxnHandle, qm);
+}
+
+bool
SimpleQueue::dequeue(qpid::broker::TxnHandle& th,
QueuedMessage& qm)
{