diff options
Diffstat (limited to 'cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp')
-rw-r--r-- | cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp b/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp index 29db6ceaf2..889f7a4cdd 100644 --- a/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp +++ b/cpp/src/tests/storePerftools/asyncPerf/SimpleMessage.cpp @@ -30,11 +30,20 @@ namespace storePerftools { namespace asyncPerf { SimpleMessage::SimpleMessage(const char* msgData, + const uint32_t msgSize) : + m_persistenceId(0ULL), + m_msg(msgData, static_cast<size_t>(msgSize)), + m_store(0), + m_msgHandle(qpid::broker::MessageHandle()) +{} + +SimpleMessage::SimpleMessage(const char* msgData, const uint32_t msgSize, - qpid::asyncStore::AsyncStoreImpl* store) : + qpid::broker::AsyncStore* store) : m_persistenceId(0ULL), m_msg(msgData, static_cast<size_t>(msgSize)), - m_msgHandle(store ? store->createMessageHandle(this) : qpid::broker::MessageHandle(0)) + m_store(store), + m_msgHandle(store ? store->createMessageHandle(this) : qpid::broker::MessageHandle()) {} SimpleMessage::~SimpleMessage() @@ -95,7 +104,7 @@ SimpleMessage::encodedHeaderSize() const bool SimpleMessage::isPersistent() const { - return m_msgHandle.isValid(); + return m_store != 0; } uint64_t |