You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2012/08/02 17:31:53 UTC
svn commit: r1368541 [1/2] - in /qpid/branches/asyncstore/cpp/src:
qpid/asyncStore/ qpid/asyncStore/jrnl2/ qpid/broker/ tests/
tests/storePerftools/ tests/storePerftools/asyncPerf/
tests/storePerftools/common/ tests/storePerftools/jrnlPerf/
Author: kpvdr
Date: Thu Aug 2 15:31:51 2012
New Revision: 1368541
URL: http://svn.apache.org/viewvc?rev=1368541&view=rev
Log:
QPID-3858: WIP: Added smoke test to cmake, code format tidy-up
Added:
qpid/branches/asyncstore/cpp/src/tests/storePerftools/storePerftoolsSmokeTest.sh (with props)
Removed:
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Parameters.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestResult.cpp
Modified:
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreOptions.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EventHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/Plugin.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/RunState.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/AsyncJournal.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataOpState.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataToken.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataWrComplState.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DequeueHeader.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EnqueueHeader.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EventHeader.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/FileHeader.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalDirectory.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalError.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalRunState.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordHeader.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordTail.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/ScopedLock.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/Streamable.cpp
qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/TransactionHeader.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandle.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandleImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/ConfigHandle.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/EnqueueHandle.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/EventHandle.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/SimpleTxnBuffer.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp
qpid/branches/asyncstore/cpp/src/qpid/broker/TxnHandle.cpp
qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake
qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Parameters.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimable.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimer.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Streamable.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestOptions.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestParameters.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestResult.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Thread.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Thread.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/jrnlPerf/Journal.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/jrnlPerf/Journal.h
qpid/branches/asyncstore/cpp/src/tests/storePerftools/jrnlPerf/JournalParameters.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/jrnlPerf/PerfTest.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/jrnlPerf/TestResult.cpp
qpid/branches/asyncstore/cpp/src/tests/storePerftools/version.h
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncOperation.cpp Thu Aug 2 15:31:51 2012
@@ -35,24 +35,20 @@ AsyncOperation::AsyncOperation(boost::sh
m_brokerCtxt(brokerCtxt)
{}
-AsyncOperation::~AsyncOperation()
-{}
+AsyncOperation::~AsyncOperation() {}
-boost::shared_ptr<qpid::broker::BrokerAsyncContext> AsyncOperation::getBrokerContext() const
-{
+boost::shared_ptr<qpid::broker::BrokerAsyncContext> AsyncOperation::getBrokerContext() const {
return m_brokerCtxt;
}
void
-AsyncOperation::submitResult()
-{
+AsyncOperation::submitResult() {
return submitResult(0, "");
}
void
AsyncOperation::submitResult(const int errNo,
- const std::string& errMsg)
-{
+ const std::string& errMsg) {
if (m_brokerCtxt.get()) {
qpid::broker::AsyncResultQueue* const arq = m_brokerCtxt->getAsyncResultQueue();
if (arq) {
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp Thu Aug 2 15:31:51 2012
@@ -51,54 +51,45 @@ AsyncStoreImpl::AsyncStoreImpl(boost::sh
m_operations(m_poller)
{}
-AsyncStoreImpl::~AsyncStoreImpl()
-{}
+AsyncStoreImpl::~AsyncStoreImpl() {}
void
-AsyncStoreImpl::initialize()
-{}
+AsyncStoreImpl::initialize() {}
uint64_t
-AsyncStoreImpl::getNextRid()
-{
+AsyncStoreImpl::getNextRid() {
return m_ridCntr.next();
}
void
-AsyncStoreImpl::initManagement(qpid::broker::Broker* /*broker*/)
-{}
+AsyncStoreImpl::initManagement(qpid::broker::Broker* /*broker*/) {}
qpid::broker::TxnHandle
-AsyncStoreImpl::createTxnHandle()
-{
+AsyncStoreImpl::createTxnHandle() {
return qpid::broker::TxnHandle(new TxnHandleImpl);
}
qpid::broker::TxnHandle
-AsyncStoreImpl::createTxnHandle(qpid::broker::SimpleTxnBuffer* tb)
-{
+AsyncStoreImpl::createTxnHandle(qpid::broker::SimpleTxnBuffer* tb) {
return qpid::broker::TxnHandle(new TxnHandleImpl(tb));
}
qpid::broker::TxnHandle
AsyncStoreImpl::createTxnHandle(const std::string& xid,
- const bool tpcFlag)
-{
+ const bool tpcFlag) {
return qpid::broker::TxnHandle(new TxnHandleImpl(xid, tpcFlag));
}
qpid::broker::TxnHandle
AsyncStoreImpl::createTxnHandle(const std::string& xid,
const bool tpcFlag,
- qpid::broker::SimpleTxnBuffer* tb)
-{
+ qpid::broker::SimpleTxnBuffer* tb) {
return qpid::broker::TxnHandle(new TxnHandleImpl(xid, tpcFlag, tb));
}
void
AsyncStoreImpl::submitPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::TpcTxnAsyncContext> TxnCtxt)
-{
+ boost::shared_ptr<qpid::broker::TpcTxnAsyncContext> TxnCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnPrepare(txnHandle, TxnCtxt));
TxnCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -106,8 +97,7 @@ AsyncStoreImpl::submitPrepare(qpid::brok
void
AsyncStoreImpl::submitCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt)
-{
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnCommit(txnHandle, TxnCtxt));
TxnCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -115,54 +105,46 @@ AsyncStoreImpl::submitCommit(qpid::broke
void
AsyncStoreImpl::submitAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt)
-{
+ boost::shared_ptr<qpid::broker::TxnAsyncContext> TxnCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpTxnAbort(txnHandle, TxnCtxt));
TxnCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
}
qpid::broker::ConfigHandle
-AsyncStoreImpl::createConfigHandle()
-{
+AsyncStoreImpl::createConfigHandle() {
return qpid::broker::ConfigHandle(new ConfigHandleImpl());
}
qpid::broker::EnqueueHandle
AsyncStoreImpl::createEnqueueHandle(qpid::broker::MessageHandle& msgHandle,
- qpid::broker::QueueHandle& queueHandle)
-{
+ qpid::broker::QueueHandle& queueHandle) {
return qpid::broker::EnqueueHandle(new EnqueueHandleImpl(msgHandle,
queueHandle));
}
qpid::broker::EventHandle
AsyncStoreImpl::createEventHandle(qpid::broker::QueueHandle& queueHandle,
- const std::string& key)
-{
+ const std::string& key) {
return qpid::broker::EventHandle(new EventHandleImpl(queueHandle,
key));
}
qpid::broker::MessageHandle
-AsyncStoreImpl::createMessageHandle(const qpid::broker::DataSource* const dataSrc)
-
-{
+AsyncStoreImpl::createMessageHandle(const qpid::broker::DataSource* const dataSrc) {
return qpid::broker::MessageHandle(new MessageHandleImpl(dataSrc));
}
qpid::broker::QueueHandle
AsyncStoreImpl::createQueueHandle(const std::string& name,
- const qpid::types::Variant::Map& opts)
-{
+ const qpid::types::Variant::Map& opts) {
return qpid::broker::QueueHandle(new QueueHandleImpl(name, opts));
}
void
AsyncStoreImpl::submitCreate(qpid::broker::ConfigHandle& cfgHandle,
const qpid::broker::DataSource* const dataSrc,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpConfigCreate(cfgHandle, dataSrc, brokerCtxt));
brokerCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -170,8 +152,7 @@ AsyncStoreImpl::submitCreate(qpid::broke
void
AsyncStoreImpl::submitDestroy(qpid::broker::ConfigHandle& cfgHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpConfigDestroy(cfgHandle, brokerCtxt));
brokerCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -180,8 +161,7 @@ AsyncStoreImpl::submitDestroy(qpid::brok
void
AsyncStoreImpl::submitCreate(qpid::broker::QueueHandle& queueHandle,
const qpid::broker::DataSource* const dataSrc,
- boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
-{
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueCreate(queueHandle, dataSrc, QueueCtxt));
QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -189,8 +169,7 @@ AsyncStoreImpl::submitCreate(qpid::broke
void
AsyncStoreImpl::submitDestroy(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
-{
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueDestroy(queueHandle, QueueCtxt));
QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -198,8 +177,7 @@ AsyncStoreImpl::submitDestroy(qpid::brok
void
AsyncStoreImpl::submitFlush(qpid::broker::QueueHandle& queueHandle,
- boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
-{
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpQueueFlush(queueHandle, QueueCtxt));
QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -209,8 +187,7 @@ void
AsyncStoreImpl::submitCreate(qpid::broker::EventHandle& eventHandle,
const qpid::broker::DataSource* const dataSrc,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpEventCreate(eventHandle, dataSrc, txnHandle, brokerCtxt));
brokerCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -219,8 +196,7 @@ AsyncStoreImpl::submitCreate(qpid::broke
void
AsyncStoreImpl::submitDestroy(qpid::broker::EventHandle& eventHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpEventDestroy(eventHandle, txnHandle, brokerCtxt));
brokerCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -229,8 +205,7 @@ AsyncStoreImpl::submitDestroy(qpid::brok
void
AsyncStoreImpl::submitEnqueue(qpid::broker::EnqueueHandle& enqHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
-{
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgEnqueue(enqHandle, txnHandle, QueueCtxt));
QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -239,8 +214,7 @@ AsyncStoreImpl::submitEnqueue(qpid::brok
void
AsyncStoreImpl::submitDequeue(qpid::broker::EnqueueHandle& enqHandle,
qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt)
-{
+ boost::shared_ptr<qpid::broker::QueueAsyncContext> QueueCtxt) {
boost::shared_ptr<const AsyncOperation> op(new AsyncOpMsgDequeue(enqHandle, txnHandle, QueueCtxt));
QueueCtxt->setOpStr(op->getOpStr());
m_operations.submit(op);
@@ -251,8 +225,7 @@ AsyncStoreImpl::loadContent(qpid::broker
qpid::broker::QueueHandle& /*queueHandle*/,
char* /*data*/,
uint64_t /*offset*/,
- const uint64_t /*length*/)
-{
+ const uint64_t /*length*/) {
return 0;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreOptions.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreOptions.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreOptions.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/AsyncStoreOptions.cpp Thu Aug 2 15:31:51 2012
@@ -43,24 +43,20 @@ AsyncStoreOptions::AsyncStoreOptions(con
m_storeDir(storeDir)
{}
-AsyncStoreOptions::~AsyncStoreOptions()
-{}
+AsyncStoreOptions::~AsyncStoreOptions() {}
void
-AsyncStoreOptions::printVals(std::ostream& os) const
-{
+AsyncStoreOptions::printVals(std::ostream& os) const {
os << "ASYNC STORE OPTIONS:" << std::endl;
os << " Store directory location for persistence [store-dir]: \"" << m_storeDir << "\"" << std::endl;
}
void
-AsyncStoreOptions::validate()
-{}
+AsyncStoreOptions::validate() {}
// private static
std::string&
-AsyncStoreOptions::getDefaultStoreDir()
-{
+AsyncStoreOptions::getDefaultStoreDir() {
static std::string s_defaultStoreDir = "/tmp";
return s_defaultStoreDir;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -26,10 +26,8 @@
namespace qpid {
namespace asyncStore {
-ConfigHandleImpl::ConfigHandleImpl()
-{}
+ConfigHandleImpl::ConfigHandleImpl() {}
-ConfigHandleImpl::~ConfigHandleImpl()
-{}
+ConfigHandleImpl::~ConfigHandleImpl() {}
}} // namespace qpid::asyncStore
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -32,7 +32,6 @@ EnqueueHandleImpl::EnqueueHandleImpl(qpi
m_queueHandle(queueHandle)
{}
-EnqueueHandleImpl::~EnqueueHandleImpl()
-{}
+EnqueueHandleImpl::~EnqueueHandleImpl() {}
}} // namespace qpid::asyncStore
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EventHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EventHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EventHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/EventHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -32,12 +32,10 @@ EventHandleImpl::EventHandleImpl(qpid::b
m_key(key)
{}
-EventHandleImpl::~EventHandleImpl()
-{}
+EventHandleImpl::~EventHandleImpl() {}
const std::string&
-EventHandleImpl::getKey() const
-{
+EventHandleImpl::getKey() const {
return m_key;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -30,7 +30,6 @@ MessageHandleImpl::MessageHandleImpl(con
m_dataSrc(dataSrc)
{}
-MessageHandleImpl::~MessageHandleImpl()
-{}
+MessageHandleImpl::~MessageHandleImpl() {}
}} // namespace qpid::asyncStore
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/OperationQueue.cpp Thu Aug 2 15:31:51 2012
@@ -36,21 +36,18 @@ OperationQueue::OperationQueue(const boo
m_opQueue.start();
}
-OperationQueue::~OperationQueue()
-{
+OperationQueue::~OperationQueue() {
m_opQueue.stop();
}
void
-OperationQueue::submit(boost::shared_ptr<const AsyncOperation> op)
-{
+OperationQueue::submit(boost::shared_ptr<const AsyncOperation> op) {
m_opQueue.push(op);
}
// private
OperationQueue::OpQueue::Batch::const_iterator
-OperationQueue::handle(const OperationQueue::OpQueue::Batch& e)
-{
+OperationQueue::handle(const OperationQueue::OpQueue::Batch& e) {
try {
for (OpQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) {
boost::shared_ptr<qpid::broker::BrokerAsyncContext> bc = (*i)->getBrokerContext();
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/Plugin.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/Plugin.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/Plugin.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/Plugin.cpp Thu Aug 2 15:31:51 2012
@@ -31,8 +31,7 @@ namespace qpid {
namespace broker {
void
-Plugin::earlyInitialize(Target& target)
-{
+Plugin::earlyInitialize(Target& target) {
Broker* broker = dynamic_cast<Broker*>(&target);
if (!broker) return;
DataDir& dataDir = broker->getDataDir ();
@@ -52,8 +51,7 @@ Plugin::earlyInitialize(Target& target)
}
void
-Plugin::initialize(Target& target)
-{
+Plugin::initialize(Target& target) {
Broker* broker = dynamic_cast<Broker*>(&target);
if (!broker || !m_store) return;
@@ -67,14 +65,12 @@ Plugin::initialize(Target& target)
}
void
-Plugin::finalize()
-{
+Plugin::finalize() {
m_store.reset();
}
qpid::Options*
-Plugin::getOptions()
-{
+Plugin::getOptions() {
return &m_options;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -32,12 +32,10 @@ QueueHandleImpl::QueueHandleImpl(const s
m_opts(opts)
{}
-QueueHandleImpl::~QueueHandleImpl()
-{}
+QueueHandleImpl::~QueueHandleImpl() {}
const std::string&
-QueueHandleImpl::getName() const
-{
+QueueHandleImpl::getName() const {
return m_name;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/RunState.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/RunState.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/RunState.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/RunState.cpp Thu Aug 2 15:31:51 2012
@@ -42,49 +42,41 @@ RunState::RunState(const RunState& s) :
qpid::asyncStore::jrnl2::State<RunState_t>(s)
{}
-RunState::~RunState()
-{}
+RunState::~RunState() {}
void
-RunState::setInitializing()
-{
+RunState::setInitializing() {
set(RS_INITIALIZING);
}
void
-RunState::setRestoring()
-{
+RunState::setRestoring() {
set(RS_RESTORING);
}
void
-RunState::setRunning()
-{
+RunState::setRunning() {
set(RS_RUNNING);
}
void
-RunState::setStopping()
-{
+RunState::setStopping() {
set(RS_STOPPING);
}
void
-RunState::setStopped()
-{
+RunState::setStopped() {
set(RS_STOPPED);
}
const char*
-RunState::getAsStr() const
-{
+RunState::getAsStr() const {
return s_toStr(m_state);
}
//static
const char*
-RunState::s_toStr(const RunState_t s)
-{
+RunState::s_toStr(const RunState_t s) {
switch (s) {
case RS_NONE:
return "WR_NONE";
@@ -107,8 +99,7 @@ RunState::s_toStr(const RunState_t s)
// private
void
-RunState::set(const RunState_t s)
-{
+RunState::set(const RunState_t s) {
// State transition logic: set stateError to true if an invalid transition is attempted
bool stateTransitionError = false;
switch (m_state) {
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -50,18 +50,15 @@ TxnHandleImpl::TxnHandleImpl(const std::
m_txnBuffer(tb)
{}
-TxnHandleImpl::~TxnHandleImpl()
-{}
+TxnHandleImpl::~TxnHandleImpl() {}
const std::string&
-TxnHandleImpl::getXid() const
-{
+TxnHandleImpl::getXid() const {
return m_xid;
}
bool
-TxnHandleImpl::is2pc() const
-{
+TxnHandleImpl::is2pc() const {
return m_tpcFlag;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/AsyncJournal.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/AsyncJournal.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/AsyncJournal.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/AsyncJournal.cpp Thu Aug 2 15:31:51 2012
@@ -36,8 +36,7 @@ namespace asyncStore {
namespace jrnl2 {
std::string
-g_ioResAsString(const jrnlOpRes /*res*/)
-{
+g_ioResAsString(const jrnlOpRes /*res*/) {
/// \todo TODO - provide implementation
return ".[g_ioResAsString].";
}
@@ -56,45 +55,38 @@ AsyncJournal::AsyncJournal(const std::st
}
std::string
-AsyncJournal::getId() const
-{
+AsyncJournal::getId() const {
return m_jrnlId;
}
JournalDirectory
-AsyncJournal::getJournalDir() const
-{
+AsyncJournal::getJournalDir() const {
return m_jrnlDir;
}
std::string
-AsyncJournal::getJournalDirName() const
-{
+AsyncJournal::getJournalDirName() const {
return m_jrnlDir.getFqName();
}
std::string
-AsyncJournal::getBaseFileName() const
-{
+AsyncJournal::getBaseFileName() const {
return m_baseFileName;
}
const JournalRunState&
-AsyncJournal::getState() const
-{
+AsyncJournal::getState() const {
return m_jrnlState;
}
const JournalParameters*
-AsyncJournal::getParameters() const
-{
+AsyncJournal::getParameters() const {
return m_jrnlParamsPtr;
}
void
AsyncJournal::initialize(const JournalParameters* jpPtr,
- AioCallback* const aiocbPtr)
-{
+ AioCallback* const aiocbPtr) {
m_jrnlParamsPtr = jpPtr;
m_aioCallbackPtr = aiocbPtr;
// --- temp code ---
@@ -108,8 +100,7 @@ AsyncJournal::enqueue(DataToken* dtokPtr
const std::size_t /*dataLen*/,
const void* /*tidPtr*/,
const std::size_t /*tidLen*/,
- const bool /*transientFlag*/)
-{
+ const bool /*transientFlag*/) {
dtokPtr->getDataOpState().enqueue();
// --- temp code ---
{ // --- START OF CRITICAL SECTION ---
@@ -127,8 +118,7 @@ AsyncJournal::enqueue(DataToken* dtokPtr
jrnlOpRes
AsyncJournal::dequeue(DataToken* const dtokPtr,
const void* /*tidPtr*/,
- const std::size_t /*tidLen*/)
-{
+ const std::size_t /*tidLen*/) {
dtokPtr->getDataOpState().dequeue();
dtokPtr->setDequeueRecordId(dtokPtr->getRecordId());
// --- temp code ---
@@ -145,22 +135,19 @@ AsyncJournal::dequeue(DataToken* const d
}
jrnlOpRes
-AsyncJournal::commit()
-{
+AsyncJournal::commit() {
/// \todo TODO - provide implementation
return 0;
}
jrnlOpRes
-AsyncJournal::abort()
-{
+AsyncJournal::abort() {
/// \todo TODO - provide implementation
return 0;
}
jrnlOpRes
-AsyncJournal::flush()
-{
+AsyncJournal::flush() {
// --- temp code ---
// --- START OF CRITICAL SECTION ---
ScopedTryLock l(m_writeDataTokensLock);
@@ -174,8 +161,7 @@ AsyncJournal::flush()
// protected
jrnlOpRes
-AsyncJournal::flushNoLock()
-{
+AsyncJournal::flushNoLock() {
// --- temp code ---
// Normally the page would be written to disk using libaio here (still to do).
uint32_t cnt = 0UL;
@@ -190,8 +176,7 @@ AsyncJournal::flushNoLock()
}
jrnlOpRes
-AsyncJournal::sync(const double timeout)
-{
+AsyncJournal::sync(const double timeout) {
// --- temp code ---
// --- START OF CRITICAL SECTION ---
ScopedTryLock l(m_writeDataTokensLock);
@@ -205,8 +190,7 @@ AsyncJournal::sync(const double timeout)
// protected
jrnlOpRes
-AsyncJournal::syncNoLock(const double /*timeout*/)
-{
+AsyncJournal::syncNoLock(const double /*timeout*/) {
// --- temp code ---
if (m_callbackDataTokens.size()) {
processCompletedAioWriteEvents();
@@ -216,8 +200,7 @@ AsyncJournal::syncNoLock(const double /*
}
void
-AsyncJournal::processCompletedAioWriteEvents(const double /*timeout*/)
-{
+AsyncJournal::processCompletedAioWriteEvents(const double /*timeout*/) {
// --- temp code ---
// --- START OF CRITICAL SECTION 1 ---
ScopedLock l1(m_callbackDataTokensLock);
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataOpState.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataOpState.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataOpState.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataOpState.cpp Thu Aug 2 15:31:51 2012
@@ -43,31 +43,26 @@ DataOpState::DataOpState(const DataOpSta
State<opState_t>(s)
{}
-DataOpState::~DataOpState()
-{}
+DataOpState::~DataOpState() {}
void
-DataOpState::enqueue()
-{
+DataOpState::enqueue() {
set(OP_ENQUEUE);
}
void
-DataOpState::dequeue()
-{
+DataOpState::dequeue() {
set(OP_DEQUEUE);
}
const char*
-DataOpState::getAsStr() const
-{
+DataOpState::getAsStr() const {
return s_toStr(m_state);
}
// static
const char*
-DataOpState::s_toStr(const opState_t s)
-{
+DataOpState::s_toStr(const opState_t s) {
switch (s) {
case OP_NONE:
return "OP_NONE";
@@ -84,8 +79,7 @@ DataOpState::s_toStr(const opState_t s)
// private
void
-DataOpState::set(const opState_t s)
-{
+DataOpState::set(const opState_t s) {
// State transition logic: set stateError to true if an invalid transition is attempted
bool stateTransitionError = false;
switch(m_state) {
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataToken.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataToken.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataToken.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataToken.cpp Thu Aug 2 15:31:51 2012
@@ -42,81 +42,68 @@ DataToken::DataToken(const recordId_t ri
DataToken::~DataToken() {}
const DataOpState&
-DataToken::getDataOpState() const
-{
+DataToken::getDataOpState() const {
return m_dataOpState;
}
DataOpState&
-DataToken::getDataOpState()
-{
+DataToken::getDataOpState() {
return m_dataOpState;
}
const DataWrComplState&
-DataToken::getDataWrComplState() const
-{
+DataToken::getDataWrComplState() const {
return m_dataWrComplState;
}
DataWrComplState&
-DataToken::getDataWrComplState()
-{
+DataToken::getDataWrComplState() {
return m_dataWrComplState;
}
bool
-DataToken::isTransient() const
-{
+DataToken::isTransient() const {
return m_transientFlag;
}
bool
-DataToken::isExternal() const
-{
+DataToken::isExternal() const {
return m_externalFlag;
}
const std::string&
-DataToken::getExternalLocation() const
-{
+DataToken::getExternalLocation() const {
return m_externalLocation;
}
recordId_t
-DataToken::getRecordId() const
-{
+DataToken::getRecordId() const {
return m_recordId;
}
bool
-DataToken::isRecordIdExternal() const
-{
+DataToken::isRecordIdExternal() const {
return m_externalRecordIdFlag;
}
recordId_t
-DataToken::getDequeueRecordId() const
-{
+DataToken::getDequeueRecordId() const {
return m_dequeueRecordId;
}
void
-DataToken::setRecordId(const recordId_t rid)
-{
+DataToken::setRecordId(const recordId_t rid) {
m_recordId = rid;
m_externalRecordIdFlag = true;
}
void
-DataToken::setDequeueRecordId(const recordId_t drid)
-{
+DataToken::setDequeueRecordId(const recordId_t drid) {
m_dequeueRecordId = drid;
}
void
-DataToken::toStream(std::ostream& os) const
-{
+DataToken::toStream(std::ostream& os) const {
/// \todo TODO: Implementation required
os << "status string";
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataWrComplState.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataWrComplState.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataWrComplState.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DataWrComplState.cpp Thu Aug 2 15:31:51 2012
@@ -43,31 +43,26 @@ DataWrComplState::DataWrComplState(const
State<wrComplState_t>(s)
{}
-DataWrComplState::~DataWrComplState()
-{}
+DataWrComplState::~DataWrComplState() {}
void
-DataWrComplState::complete()
-{
+DataWrComplState::complete() {
set(WR_COMPLETE);
}
void
-DataWrComplState::partComplete()
-{
+DataWrComplState::partComplete() {
set(WR_PART);
}
const char*
-DataWrComplState::getAsStr() const
-{
+DataWrComplState::getAsStr() const {
return s_toStr(m_state);
}
// static
const char*
-DataWrComplState::s_toStr(const wrComplState_t s)
-{
+DataWrComplState::s_toStr(const wrComplState_t s) {
switch (s) {
case WR_NONE:
return "WR_NONE";
@@ -84,8 +79,7 @@ DataWrComplState::s_toStr(const wrComplS
// protected
void
-DataWrComplState::set(const wrComplState_t s)
-{
+DataWrComplState::set(const wrComplState_t s) {
// State transition logic: set stateError to true if an invalid transition is attempted
bool stateTransitionError = false;
switch(m_state) {
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DequeueHeader.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DequeueHeader.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DequeueHeader.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/DequeueHeader.cpp Thu Aug 2 15:31:51 2012
@@ -55,34 +55,29 @@ DequeueHeader::DequeueHeader(const Deque
m_xidSize(dh.m_xidSize)
{}
-DequeueHeader::~DequeueHeader()
-{}
+DequeueHeader::~DequeueHeader() {}
void
-DequeueHeader::copy(const DequeueHeader& dh)
-{
+DequeueHeader::copy(const DequeueHeader& dh) {
RecordHeader::copy(dh);
m_dequeuedRecordId = dh.m_dequeuedRecordId;
m_xidSize = dh.m_xidSize;
}
void
-DequeueHeader::reset()
-{
+DequeueHeader::reset() {
RecordHeader::reset();
m_dequeuedRecordId = 0;
m_xidSize = 0;
}
bool
-DequeueHeader::getTplCommitOnTxnComplFlag() const
-{
+DequeueHeader::getTplCommitOnTxnComplFlag() const {
return m_flags & DEQ_HDR_TPL_COMMIT_ON_TXN_COMPL_MASK;
}
void
-DequeueHeader::setTplCommitOnTxnComplFlag(const bool commitOnTxnCompl)
-{
+DequeueHeader::setTplCommitOnTxnComplFlag(const bool commitOnTxnCompl) {
m_flags = commitOnTxnCompl ?
m_flags | DEQ_HDR_TPL_COMMIT_ON_TXN_COMPL_MASK :
m_flags & (~DEQ_HDR_TPL_COMMIT_ON_TXN_COMPL_MASK);
@@ -90,20 +85,17 @@ DequeueHeader::setTplCommitOnTxnComplFla
//static
uint64_t
-DequeueHeader::getHeaderSize()
-{
+DequeueHeader::getHeaderSize() {
return static_cast<uint64_t>(sizeof(DequeueHeader));
}
uint64_t
-DequeueHeader::getBodySize() const
-{
+DequeueHeader::getBodySize() const {
return m_xidSize;
}
uint64_t
-DequeueHeader::getRecordSize() const
-{
+DequeueHeader::getRecordSize() const {
return getHeaderSize() + (getBodySize() > 0LL ?
getBodySize() + RecordTail::getSize() :
0);
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EnqueueHeader.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EnqueueHeader.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EnqueueHeader.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EnqueueHeader.cpp Thu Aug 2 15:31:51 2012
@@ -49,32 +49,27 @@ EnqueueHeader::EnqueueHeader(const Enque
EventHeader(eh)
{}
-EnqueueHeader::~EnqueueHeader()
-{}
+EnqueueHeader::~EnqueueHeader() {}
bool
-EnqueueHeader::getTransientFlag() const
-{
+EnqueueHeader::getTransientFlag() const {
return m_flags & ENQ_HDR_TRANSIENT_MASK;
}
void
-EnqueueHeader::setTransientFlag(const bool transient)
-{
+EnqueueHeader::setTransientFlag(const bool transient) {
m_flags = transient ?
m_flags | ENQ_HDR_TRANSIENT_MASK :
m_flags & (~ENQ_HDR_TRANSIENT_MASK);
}
bool
-EnqueueHeader::getExternalFlag() const
-{
+EnqueueHeader::getExternalFlag() const {
return m_flags & ENQ_HDR_EXTERNAL_MASK;
}
void
-EnqueueHeader::setExternalFlag(const bool external)
-{
+EnqueueHeader::setExternalFlag(const bool external) {
m_flags = external ?
m_flags | ENQ_HDR_EXTERNAL_MASK :
m_flags & (~ENQ_HDR_EXTERNAL_MASK);
@@ -82,8 +77,7 @@ EnqueueHeader::setExternalFlag(const boo
//static
uint64_t
-EnqueueHeader::getHeaderSize()
-{
+EnqueueHeader::getHeaderSize() {
return sizeof(EnqueueHeader);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EventHeader.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EventHeader.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EventHeader.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/EventHeader.cpp Thu Aug 2 15:31:51 2012
@@ -52,20 +52,17 @@ EventHeader::EventHeader(const EventHead
m_dataSize(eh.m_dataSize)
{}
-EventHeader::~EventHeader()
-{}
+EventHeader::~EventHeader() {}
void
-EventHeader::copy(const EventHeader& e)
-{
+EventHeader::copy(const EventHeader& e) {
RecordHeader::copy(e);
m_xidSize = e.m_xidSize;
m_dataSize = e.m_dataSize;
}
void
-EventHeader::reset()
-{
+EventHeader::reset() {
RecordHeader::reset();
m_xidSize = 0;
m_dataSize = 0;
@@ -73,20 +70,17 @@ EventHeader::reset()
//static
uint64_t
-EventHeader::getHeaderSize()
-{
+EventHeader::getHeaderSize() {
return sizeof(EventHeader);
}
uint64_t
-EventHeader::getBodySize() const
-{
+EventHeader::getBodySize() const {
return m_xidSize + m_dataSize;
}
uint64_t
-EventHeader::getRecordSize() const
-{
+EventHeader::getRecordSize() const {
return getHeaderSize() + (getBodySize() ?
getBodySize() + RecordTail::getSize() :
0);
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/FileHeader.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/FileHeader.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/FileHeader.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/FileHeader.cpp Thu Aug 2 15:31:51 2012
@@ -73,12 +73,10 @@ FileHeader::FileHeader(const FileHeader&
m_reserved(fh.m_reserved)
{}
-FileHeader::~FileHeader()
-{}
+FileHeader::~FileHeader() {}
void
-FileHeader::copy(const FileHeader& fh)
-{
+FileHeader::copy(const FileHeader& fh) {
RecordHeader::copy(fh);
m_physicalFileId = fh.m_physicalFileId;
m_logicalFileId = fh.m_logicalFileId;
@@ -89,8 +87,7 @@ FileHeader::copy(const FileHeader& fh)
}
void
-FileHeader::reset()
-{
+FileHeader::reset() {
RecordHeader::reset();
m_physicalFileId = 0;
m_logicalFileId = 0;
@@ -102,26 +99,22 @@ FileHeader::reset()
//static
uint64_t
-FileHeader::getHeaderSize()
-{
+FileHeader::getHeaderSize() {
return sizeof(FileHeader);
}
uint64_t
-FileHeader::getBodySize() const
-{
+FileHeader::getBodySize() const {
return 0;
}
uint64_t
-FileHeader::getRecordSize() const
-{
+FileHeader::getRecordSize() const {
return getHeaderSize();
}
void
-FileHeader::setTimestamp()
-{
+FileHeader::setTimestamp() {
/// \todo TODO: Standardize on method for getting time that does not require a context switch.
timespec ts;
if (::clock_gettime(CLOCK_REALTIME, &ts)) {
@@ -133,8 +126,7 @@ FileHeader::setTimestamp()
}
void
-FileHeader::setTimestamp(const timespec& ts)
-{
+FileHeader::setTimestamp(const timespec& ts) {
m_timestampSeconds = static_cast<uint64_t>(ts.tv_sec);
m_timestampNanoSeconds = static_cast<uint32_t>(ts.tv_nsec);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalDirectory.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalDirectory.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalDirectory.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalDirectory.cpp Thu Aug 2 15:31:51 2012
@@ -42,16 +42,14 @@ JournalDirectory::JournalDirectory(const
{}
const
-std::string JournalDirectory::getFqName() const
-{
+std::string JournalDirectory::getFqName() const {
return m_fqName;
}
void
JournalDirectory::setFqName(const std::string newFqName,
const bool createNew,
- const bool destroyExisting)
-{
+ const bool destroyExisting) {
if (m_fqName.compare(newFqName) != 0) {
if (destroyExisting) {
destroy();
@@ -66,8 +64,7 @@ JournalDirectory::setFqName(const std::s
// static
bool
JournalDirectory::s_exists(const std::string& fqName,
- const bool checkIsWritable)
-{
+ const bool checkIsWritable) {
struct stat buff;
if (::lstat(fqName.c_str(), &buff)) {
if (errno == ENOENT) // No such dir or file
@@ -83,8 +80,7 @@ JournalDirectory::s_exists(const std::st
// static
void
-JournalDirectory::s_create(const std::string& fqName)
-{
+JournalDirectory::s_create(const std::string& fqName) {
std::size_t fdp = fqName.find_last_of('/');
if (fdp != std::string::npos) {
std::string parent_dir = fqName.substr(0, fdp);
@@ -100,8 +96,7 @@ JournalDirectory::s_create(const std::st
}
void
-JournalDirectory::create()
-{
+JournalDirectory::create() {
s_create(m_fqName);
m_verified = true;
}
@@ -109,14 +104,12 @@ JournalDirectory::create()
//static
void
JournalDirectory::s_clear(const std::string& fqName,
- const bool recursiveDelete)
-{
+ const bool recursiveDelete) {
s_destroy(fqName, recursiveDelete, true);
}
void
-JournalDirectory::clear(const bool recursiveDelete)
-{
+JournalDirectory::clear(const bool recursiveDelete) {
s_clear(m_fqName, recursiveDelete);
}
@@ -124,8 +117,7 @@ JournalDirectory::clear(const bool recur
void
JournalDirectory::s_destroy(const std::string& fqName,
const bool recursiveDelete,
- const bool childrenOnly)
-{
+ const bool childrenOnly) {
if (s_exists(fqName)) {
DIR* dir = ::opendir(fqName.c_str());
if (dir) {
@@ -161,8 +153,7 @@ JournalDirectory::s_destroy(const std::s
void
JournalDirectory::destroy(const bool recursiveDelete,
- const bool childrenOnly)
-{
+ const bool childrenOnly) {
if (m_verified) {
s_destroy(m_fqName, recursiveDelete, childrenOnly);
m_verified = false;
@@ -170,8 +161,7 @@ JournalDirectory::destroy(const bool rec
}
bool
-JournalDirectory::isVerified() const
-{
+JournalDirectory::isVerified() const {
return m_verified;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalError.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalError.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalError.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalError.cpp Thu Aug 2 15:31:51 2012
@@ -126,49 +126,41 @@ JournalError::JournalError(const uint32_
formatWhatStr();
}
-JournalError::~JournalError() throw ()
-{}
+JournalError::~JournalError() throw () {}
const char*
-JournalError::what() const throw ()
-{
+JournalError::what() const throw () {
return m_what.c_str();
}
uint32_t
-JournalError::getErrorCode() const throw ()
-{
+JournalError::getErrorCode() const throw () {
return m_errorCode;
}
const std::string
-JournalError::getAdditionalInfo() const throw ()
-{
+JournalError::getAdditionalInfo() const throw () {
return m_additionalInfo;
}
const std::string
-JournalError::getThrowingClass() const throw ()
-{
+JournalError::getThrowingClass() const throw () {
return m_throwingClass;
}
const std::string
-JournalError::getThrowingFunction() const throw ()
-{
+JournalError::getThrowingFunction() const throw () {
return m_throwingFunction;
}
void
-JournalError::toStream(std::ostream& os) const
-{
+JournalError::toStream(std::ostream& os) const {
os << what();
}
// protected
void
-JournalError::formatWhatStr() throw ()
-{
+JournalError::formatWhatStr() throw () {
try {
const bool ai = !m_additionalInfo.empty();
const bool tc = !m_throwingClass.empty();
@@ -198,8 +190,7 @@ JournalError::formatWhatStr() throw ()
// protected
const char*
-JournalError::className()
-{
+JournalError::className() {
return s_className;
}
@@ -229,8 +220,7 @@ const uint32_t JournalError::JERR_DIRNOT
// static
const char*
-JournalError::s_errorMessage(const uint32_t err_no) throw ()
-{
+JournalError::s_errorMessage(const uint32_t err_no) throw () {
s_errorMapIterator = s_errorMap.find(err_no);
if (s_errorMapIterator == s_errorMap.end())
return "<Unknown error code>";
@@ -243,8 +233,7 @@ bool JournalError::s_initializedFlag = J
// private static
bool
-JournalError::s_initialize()
-{
+JournalError::s_initialize() {
s_errorMap[JERR_PTHREAD] = "JERR_PTHREAD: pthread operation failure";
s_errorMap[JERR_RTCLOCK] = "JERR_RTCLOCK: realtime clock operation failure";
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalRunState.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalRunState.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalRunState.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/JournalRunState.cpp Thu Aug 2 15:31:51 2012
@@ -43,55 +43,46 @@ JournalRunState::JournalRunState(const j
State<journalState_t>(s)
{}
-JournalRunState::~JournalRunState()
-{}
+JournalRunState::~JournalRunState() {}
void
-JournalRunState::initialize()
-{
+JournalRunState::initialize() {
set(JS_INITIALIZING);
}
void
-JournalRunState::recoverPhase1()
-{
+JournalRunState::recoverPhase1() {
set(JS_RECOVERING_PHASE_1);
}
void
-JournalRunState::recoverPhase2()
-{
+JournalRunState::recoverPhase2() {
set(JS_RECOVERING_PHASE_2);
}
void
-JournalRunState::run()
-{
+JournalRunState::run() {
set(JS_RUNNING);
}
void
-JournalRunState::stop()
-{
+JournalRunState::stop() {
set(JS_STOPPING);
}
void
-JournalRunState::stopped()
-{
+JournalRunState::stopped() {
set(JS_STOPPED);
}
const char*
-JournalRunState::getAsStr() const
-{
+JournalRunState::getAsStr() const {
return s_toStr(m_state);
}
// static
const char*
-JournalRunState::s_toStr(const journalState_t s)
-{
+JournalRunState::s_toStr(const journalState_t s) {
switch (s) {
case JS_NONE:
return "JS_NONE";
@@ -116,8 +107,7 @@ JournalRunState::s_toStr(const journalSt
// private
void
-JournalRunState::set(const journalState_t s)
-{
+JournalRunState::set(const journalState_t s) {
// State transition logic: set stateError to true if an invalid transition is attempted
bool stateTransitionError = false;
switch(m_state) {
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordHeader.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordHeader.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordHeader.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordHeader.cpp Thu Aug 2 15:31:51 2012
@@ -56,12 +56,10 @@ RecordHeader::RecordHeader(const RecordH
m_recordId(rh.m_recordId)
{}
-RecordHeader::~RecordHeader()
-{}
+RecordHeader::~RecordHeader() {}
void
-RecordHeader::copy(const RecordHeader& rh)
-{
+RecordHeader::copy(const RecordHeader& rh) {
m_magic = rh.m_magic;
m_version = rh.m_version;
m_bigEndianFlag = rh.m_bigEndianFlag;
@@ -70,8 +68,7 @@ RecordHeader::copy(const RecordHeader& r
}
void
-RecordHeader::reset()
-{
+RecordHeader::reset() {
m_magic = 0;
m_version = 0;
m_bigEndianFlag = 0;
@@ -80,14 +77,12 @@ RecordHeader::reset()
}
bool
-RecordHeader::getOverwriteIndicator() const
-{
+RecordHeader::getOverwriteIndicator() const {
return m_flags & HDR_OVERWRITE_INDICATOR_MASK;
}
void
-RecordHeader::setOverwriteIndicator(const bool owi)
-{
+RecordHeader::setOverwriteIndicator(const bool owi) {
m_flags = owi ?
m_flags | HDR_OVERWRITE_INDICATOR_MASK :
m_flags & (~HDR_OVERWRITE_INDICATOR_MASK);
@@ -95,14 +90,12 @@ RecordHeader::setOverwriteIndicator(cons
//static
uint64_t
-RecordHeader::getHeaderSize()
-{
+RecordHeader::getHeaderSize() {
return static_cast<uint64_t>(sizeof(RecordHeader));
}
uint32_t
-RecordHeader::getCheckSum(uint32_t initialValue) const
-{
+RecordHeader::getCheckSum(uint32_t initialValue) const {
uint32_t cs = initialValue;
for (unsigned char* p = (unsigned char*)this;
p < (unsigned char*)this + getHeaderSize() + getBodySize();
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordTail.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordTail.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordTail.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/RecordTail.cpp Thu Aug 2 15:31:51 2012
@@ -57,16 +57,14 @@ RecordTail::RecordTail(const RecordTail&
{}
void
-RecordTail::copy(const RecordTail& rt)
-{
+RecordTail::copy(const RecordTail& rt) {
m_xMagic = rt.m_xMagic;
m_checkSum = rt.m_checkSum;
m_recordId = rt.m_recordId;
}
void
-RecordTail::reset()
-{
+RecordTail::reset() {
m_xMagic = 0xffffffff;
m_checkSum = 0;
m_recordId = 0;
@@ -74,8 +72,7 @@ RecordTail::reset()
//static
uint64_t
-RecordTail::getSize()
-{
+RecordTail::getSize() {
return sizeof(RecordTail);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/ScopedLock.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/ScopedLock.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/ScopedLock.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/ScopedLock.cpp Thu Aug 2 15:31:51 2012
@@ -40,14 +40,12 @@ ScopedMutex::ScopedMutex()
PTHREAD_CHK(::pthread_mutex_init(&m_mutex, 0), "::pthread_mutex_init", "ScopedMutex", "ScopedMutex");
}
-ScopedMutex::~ScopedMutex()
-{
+ScopedMutex::~ScopedMutex() {
PTHREAD_CHK(::pthread_mutex_destroy(&m_mutex), "::pthread_mutex_destroy", "ScopedMutex", "~ScopedMutex");
}
::pthread_mutex_t*
-ScopedMutex::get() const
-{
+ScopedMutex::get() const {
return &m_mutex;
}
@@ -58,8 +56,7 @@ ScopedMutexContainer::ScopedMutexContain
m_scopedMutexRef(sm)
{}
-::pthread_mutex_t* ScopedMutexContainer::get() const
-{
+::pthread_mutex_t* ScopedMutexContainer::get() const {
return m_scopedMutexRef.get();
}
@@ -72,8 +69,7 @@ ScopedLock::ScopedLock(const ScopedMutex
PTHREAD_CHK(::pthread_mutex_lock(m_scopedMutexRef.get()), "::pthread_mutex_lock", "ScopedLock", "ScopedLock");
}
-ScopedLock::~ScopedLock()
-{
+ScopedLock::~ScopedLock() {
PTHREAD_CHK(::pthread_mutex_unlock(m_scopedMutexRef.get()), "::pthread_mutex_unlock", "ScopedLock", "~ScopedLock");
}
@@ -91,16 +87,14 @@ ScopedTryLock::ScopedTryLock(const Scope
}
}
-ScopedTryLock::~ScopedTryLock()
-{
+ScopedTryLock::~ScopedTryLock() {
if (m_lockedFlag)
PTHREAD_CHK(::pthread_mutex_unlock(m_scopedMutexRef.get()), "::pthread_mutex_unlock", "ScopedTryLock",
"~ScopedTryLock");
}
bool
-ScopedTryLock::isLocked() const
-{
+ScopedTryLock::isLocked() const {
return m_lockedFlag;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/Streamable.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/Streamable.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/Streamable.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/Streamable.cpp Thu Aug 2 15:31:51 2012
@@ -29,27 +29,23 @@ namespace qpid {
namespace asyncStore {
namespace jrnl2 {
-Streamable::~Streamable()
-{}
+Streamable::~Streamable() {}
std::string
-Streamable::toString() const
-{
+Streamable::toString() const {
std::ostringstream oss;
toStream(oss);
return oss.str();
}
std::ostream&
-operator<<(std::ostream& os, const Streamable& s)
-{
+operator<<(std::ostream& os, const Streamable& s) {
s.toStream(os);
return os;
}
std::ostream&
-operator<<(std::ostream& os, const Streamable* sPtr)
-{
+operator<<(std::ostream& os, const Streamable* sPtr) {
sPtr->toStream(os);
return os;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/TransactionHeader.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/TransactionHeader.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/TransactionHeader.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/asyncStore/jrnl2/TransactionHeader.cpp Thu Aug 2 15:31:51 2012
@@ -47,39 +47,33 @@ TransactionHeader::TransactionHeader(con
m_xidSize(th.m_xidSize)
{}
-TransactionHeader::~TransactionHeader()
-{}
+TransactionHeader::~TransactionHeader() {}
void
-TransactionHeader::copy(const TransactionHeader& th)
-{
+TransactionHeader::copy(const TransactionHeader& th) {
RecordHeader::copy(th);
m_xidSize = th.m_xidSize;
}
void
-TransactionHeader::reset()
-{
+TransactionHeader::reset() {
RecordHeader::reset();
m_xidSize = 0;
}
//static
uint64_t
-TransactionHeader::getHeaderSize()
-{
+TransactionHeader::getHeaderSize() {
return sizeof(TransactionHeader);
}
uint64_t
-TransactionHeader::getBodySize() const
-{
+TransactionHeader::getBodySize() const {
return m_xidSize;
}
uint64_t
-TransactionHeader::getRecordSize() const
-{
+TransactionHeader::getRecordSize() const {
// By definition, TransactionRecords must always have an xid, hence a record
// tail as well. No check on body size required in this case.
return getHeaderSize() + getBodySize() + RecordTail::getSize();
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandle.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandle.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandle.cpp Thu Aug 2 15:31:51 2012
@@ -32,49 +32,43 @@ namespace broker {
typedef PrivateImplRef<AsyncResultHandle> PrivateImpl;
AsyncResultHandle::AsyncResultHandle(AsyncResultHandleImpl* p) :
- Handle<AsyncResultHandleImpl>()
+ Handle<AsyncResultHandleImpl>()
{
PrivateImpl::ctor(*this, p);
}
AsyncResultHandle::AsyncResultHandle(const AsyncResultHandle& r) :
- Handle<AsyncResultHandleImpl>()
+ Handle<AsyncResultHandleImpl>()
{
PrivateImpl::copy(*this, r);
}
-AsyncResultHandle::~AsyncResultHandle()
-{
+AsyncResultHandle::~AsyncResultHandle() {
PrivateImpl::dtor(*this);
}
AsyncResultHandle&
-AsyncResultHandle::operator=(const AsyncResultHandle& r)
-{
+AsyncResultHandle::operator=(const AsyncResultHandle& r) {
return PrivateImpl::assign(*this, r);
}
int
-AsyncResultHandle::getErrNo() const
-{
+AsyncResultHandle::getErrNo() const {
return impl->getErrNo();
}
std::string
-AsyncResultHandle::getErrMsg() const
-{
+AsyncResultHandle::getErrMsg() const {
return impl->getErrMsg();
}
boost::shared_ptr<BrokerAsyncContext>
-AsyncResultHandle::getBrokerAsyncContext() const
-{
+AsyncResultHandle::getBrokerAsyncContext() const {
return impl->getBrokerAsyncContext();
}
void
-AsyncResultHandle::invokeAsyncResultCallback() const
-{
+AsyncResultHandle::invokeAsyncResultCallback() const {
impl->getBrokerAsyncContext()->invokeCallback(this);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandleImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandleImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandleImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultHandleImpl.cpp Thu Aug 2 15:31:51 2012
@@ -45,24 +45,20 @@ AsyncResultHandleImpl::AsyncResultHandle
m_bc(bc)
{}
-AsyncResultHandleImpl::~AsyncResultHandleImpl()
-{}
+AsyncResultHandleImpl::~AsyncResultHandleImpl() {}
int
-AsyncResultHandleImpl::getErrNo() const
-{
+AsyncResultHandleImpl::getErrNo() const {
return m_errNo;
}
std::string
-AsyncResultHandleImpl::getErrMsg() const
-{
+AsyncResultHandleImpl::getErrMsg() const {
return m_errMsg;
}
boost::shared_ptr<BrokerAsyncContext>
-AsyncResultHandleImpl::getBrokerAsyncContext() const
-{
+AsyncResultHandleImpl::getBrokerAsyncContext() const {
return m_bc;
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/AsyncResultQueueImpl.cpp Thu Aug 2 15:31:51 2012
@@ -36,21 +36,18 @@ AsyncResultQueueImpl::AsyncResultQueueIm
m_resQueue.start();
}
-AsyncResultQueueImpl::~AsyncResultQueueImpl()
-{
+AsyncResultQueueImpl::~AsyncResultQueueImpl() {
m_resQueue.stop();
}
void
-AsyncResultQueueImpl::submit(boost::shared_ptr<AsyncResultHandle> arh)
-{
+AsyncResultQueueImpl::submit(boost::shared_ptr<AsyncResultHandle> arh) {
m_resQueue.push(arh);
}
// private
AsyncResultQueueImpl::ResultQueue::Batch::const_iterator
-AsyncResultQueueImpl::handle(const ResultQueue::Batch& e)
-{
+AsyncResultQueueImpl::handle(const ResultQueue::Batch& e) {
try {
for (ResultQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) {
if ((*i)->isValid()) {
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/ConfigHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/ConfigHandle.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/ConfigHandle.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/ConfigHandle.cpp Thu Aug 2 15:31:51 2012
@@ -44,14 +44,12 @@ ConfigHandle::ConfigHandle(const ConfigH
PrivateImpl::copy(*this, r);
}
-ConfigHandle::~ConfigHandle()
-{
+ConfigHandle::~ConfigHandle() {
PrivateImpl::dtor(*this);
}
ConfigHandle&
-ConfigHandle::operator=(const ConfigHandle& r)
-{
+ConfigHandle::operator=(const ConfigHandle& r) {
return PrivateImpl::assign(*this, r);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/EnqueueHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/EnqueueHandle.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/EnqueueHandle.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/EnqueueHandle.cpp Thu Aug 2 15:31:51 2012
@@ -44,14 +44,12 @@ EnqueueHandle::EnqueueHandle(const Enque
PrivateImpl::copy(*this, r);
}
-EnqueueHandle::~EnqueueHandle()
-{
+EnqueueHandle::~EnqueueHandle() {
PrivateImpl::dtor(*this);
}
EnqueueHandle&
-EnqueueHandle::operator=(const EnqueueHandle& r)
-{
+EnqueueHandle::operator=(const EnqueueHandle& r) {
return PrivateImpl::assign(*this, r);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/EventHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/EventHandle.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/EventHandle.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/EventHandle.cpp Thu Aug 2 15:31:51 2012
@@ -44,22 +44,19 @@ EventHandle::EventHandle(const EventHand
PrivateImpl::copy(*this, r);
}
-EventHandle::~EventHandle()
-{
+EventHandle::~EventHandle() {
PrivateImpl::dtor(*this);
}
EventHandle&
-EventHandle::operator=(const EventHandle& r)
-{
+EventHandle::operator=(const EventHandle& r) {
return PrivateImpl::assign(*this, r);
}
// --- EventHandleImpl methods ---
const std::string&
-EventHandle::getKey() const
-{
+EventHandle::getKey() const {
return impl->getKey();
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/SimpleTxnBuffer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/SimpleTxnBuffer.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/SimpleTxnBuffer.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/SimpleTxnBuffer.cpp Thu Aug 2 15:31:51 2012
@@ -238,8 +238,7 @@ SimpleTxnBuffer::getNumOps() const {
// private
void
-SimpleTxnBuffer::createLocalXid()
-{
+SimpleTxnBuffer::createLocalXid() {
uuid_t uuid;
{
qpid::sys::ScopedLock<qpid::sys::Mutex> l(s_uuidMutex);
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnAsyncContext.cpp Thu Aug 2 15:31:51 2012
@@ -34,24 +34,20 @@ TxnAsyncContext::TxnAsyncContext(SimpleT
m_arq(arq)
{}
-TxnAsyncContext::~TxnAsyncContext()
-{}
+TxnAsyncContext::~TxnAsyncContext() {}
SimpleTxnBuffer*
-TxnAsyncContext::getTxnBuffer() const
-{
+TxnAsyncContext::getTxnBuffer() const {
return m_tb;
}
AsyncResultQueue*
-TxnAsyncContext::getAsyncResultQueue() const
-{
+TxnAsyncContext::getAsyncResultQueue() const {
return m_arq;
}
void
-TxnAsyncContext::invokeCallback(const AsyncResultHandle* const arh) const
-{
+TxnAsyncContext::invokeCallback(const AsyncResultHandle* const arh) const {
if (m_rcb) {
m_rcb(arh);
}
Modified: qpid/branches/asyncstore/cpp/src/qpid/broker/TxnHandle.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/qpid/broker/TxnHandle.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/qpid/broker/TxnHandle.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/qpid/broker/TxnHandle.cpp Thu Aug 2 15:31:51 2012
@@ -44,14 +44,12 @@ TxnHandle::TxnHandle(const TxnHandle& r)
PrivateImpl::copy(*this, r);
}
-TxnHandle::~TxnHandle()
-{
+TxnHandle::~TxnHandle() {
PrivateImpl::dtor(*this);
}
TxnHandle&
-TxnHandle::operator=(const TxnHandle& r)
-{
+TxnHandle::operator=(const TxnHandle& r) {
return PrivateImpl::assign(*this, r);
}
Modified: qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake (original)
+++ qpid/branches/asyncstore/cpp/src/tests/asyncstore.cmake Thu Aug 2 15:31:51 2012
@@ -22,19 +22,17 @@
# New journal perf test (jrnl2Perf)
set (jrnl2Perf_SOURCES
- storePerftools/jrnlPerf/Journal.cpp
- storePerftools/jrnlPerf/JournalParameters.cpp
- storePerftools/jrnlPerf/PerfTest.cpp
- storePerftools/jrnlPerf/TestResult.cpp
+ storePerftools/jrnlPerf/Journal.cpp
+ storePerftools/jrnlPerf/JournalParameters.cpp
+ storePerftools/jrnlPerf/PerfTest.cpp
+ storePerftools/jrnlPerf/TestResult.cpp
- storePerftools/common/Parameters.cpp
storePerftools/common/PerftoolError.cpp
- storePerftools/common/ScopedTimable.cpp
- storePerftools/common/ScopedTimer.cpp
- storePerftools/common/Streamable.cpp
- storePerftools/common/TestParameters.cpp
- storePerftools/common/TestResult.cpp
- storePerftools/common/Thread.cpp
+ storePerftools/common/ScopedTimable.cpp
+ storePerftools/common/ScopedTimer.cpp
+ storePerftools/common/Streamable.cpp
+ storePerftools/common/TestParameters.cpp
+ storePerftools/common/Thread.cpp
)
if (UNIX)
@@ -47,33 +45,23 @@ if (UNIX)
qpidbroker
rt
)
+ add_test (Store_Perftools_Smoke_Test ${CMAKE_CURRENT_SOURCE_DIR}/storePerftools/storePerftoolsSmokeTest.sh)
endif (UNIX)
# Async store perf test (asyncPerf)
set (asyncStorePerf_SOURCES
storePerftools/asyncPerf/MessageConsumer.cpp
storePerftools/asyncPerf/MessageProducer.cpp
- storePerftools/asyncPerf/PerfTest.cpp
-# storePerftools/asyncPerf/SimpleDeliverable.cpp
-# storePerftools/asyncPerf/SimpleDeliveryRecord.cpp
-# storePerftools/asyncPerf/SimpleMessage.cpp
-# storePerftools/asyncPerf/SimpleMessageAsyncContext.cpp
-# storePerftools/asyncPerf/SimpleMessageDeque.cpp
-# storePerftools/asyncPerf/SimpleQueue.cpp
-# storePerftools/asyncPerf/SimpleQueuedMessage.cpp
-# storePerftools/asyncPerf/SimpleTxnAccept.cpp
-# storePerftools/asyncPerf/SimpleTxnPublish.cpp
- storePerftools/asyncPerf/TestOptions.cpp
- storePerftools/asyncPerf/TestResult.cpp
+ storePerftools/asyncPerf/PerfTest.cpp
+ storePerftools/asyncPerf/TestOptions.cpp
+ storePerftools/asyncPerf/TestResult.cpp
- storePerftools/common/Parameters.cpp
storePerftools/common/PerftoolError.cpp
- storePerftools/common/ScopedTimable.cpp
- storePerftools/common/ScopedTimer.cpp
- storePerftools/common/Streamable.cpp
- storePerftools/common/TestOptions.cpp
- storePerftools/common/TestResult.cpp
- storePerftools/common/Thread.cpp
+ storePerftools/common/ScopedTimable.cpp
+ storePerftools/common/ScopedTimer.cpp
+ storePerftools/common/Streamable.cpp
+ storePerftools/common/TestOptions.cpp
+ storePerftools/common/Thread.cpp
)
if (UNIX)
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.cpp Thu Aug 2 15:31:51 2012
@@ -43,7 +43,8 @@ MessageConsumer::MessageConsumer(const T
m_perfTestParams(perfTestParams),
m_store(store),
m_resultQueue(arq),
- m_queue(queue)
+ m_queue(queue),
+ m_stopFlag(false)
{}
MessageConsumer::~MessageConsumer() {}
@@ -56,6 +57,11 @@ MessageConsumer::record(boost::shared_pt
void
MessageConsumer::commitComplete() {}
+void
+MessageConsumer::stop() {
+ m_stopFlag = true;
+}
+
void*
MessageConsumer::runConsumers() {
const bool useTxns = m_perfTestParams.m_deqTxnBlockSize > 0U;
@@ -68,7 +74,7 @@ MessageConsumer::runConsumers() {
uint32_t msgsPerConsumer = m_perfTestParams.m_numEnqThreadsPerQueue * m_perfTestParams.m_numMsgs /
m_perfTestParams.m_numDeqThreadsPerQueue;
uint32_t numMsgs = 0UL;
- while (numMsgs < msgsPerConsumer) {
+ while (numMsgs < msgsPerConsumer && !m_stopFlag) {
if (m_queue->dispatch(*this)) {
++numMsgs;
if (useTxns) {
@@ -78,7 +84,7 @@ MessageConsumer::runConsumers() {
tb->enlist(ta);
if (++opsInTxnCnt >= m_perfTestParams.m_deqTxnBlockSize) {
tb->commitLocal(m_store);
- if (numMsgs < m_perfTestParams.m_numMsgs) {
+ if (numMsgs < msgsPerConsumer) {
tb = new qpid::broker::SimpleTxnBuffer(m_resultQueue);
}
opsInTxnCnt = 0U;
@@ -95,7 +101,7 @@ MessageConsumer::runConsumers() {
}
}
- if (opsInTxnCnt) {
+ if (opsInTxnCnt && !m_stopFlag) {
tb->commitLocal(m_store);
}
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.h?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageConsumer.h Thu Aug 2 15:31:51 2012
@@ -53,6 +53,7 @@ public:
virtual ~MessageConsumer();
void record(boost::shared_ptr<qpid::broker::SimpleDeliveryRecord> dr);
void commitComplete();
+ void stop();
void* runConsumers();
static void* startConsumers(void* ptr);
@@ -62,6 +63,7 @@ private:
qpid::broker::AsyncResultQueue& m_resultQueue;
boost::shared_ptr<qpid::broker::SimpleQueue> m_queue;
std::deque<boost::shared_ptr<qpid::broker::SimpleDeliveryRecord> > m_unacked;
+ bool m_stopFlag;
};
}}} // namespace tests::storePerftools::asyncPerf
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.cpp Thu Aug 2 15:31:51 2012
@@ -45,11 +45,17 @@ MessageProducer::MessageProducer(const T
m_msgData(msgData),
m_store(store),
m_resultQueue(arq),
- m_queue(queue)
+ m_queue(queue),
+ m_stopFlag(false)
{}
MessageProducer::~MessageProducer() {}
+void
+MessageProducer::stop() {
+ m_stopFlag = true;
+}
+
void*
MessageProducer::runProducers() {
const bool useTxns = m_perfTestParams.m_enqTxnBlockSize > 0U;
@@ -58,7 +64,7 @@ MessageProducer::runProducers() {
if (useTxns) {
tb = new qpid::broker::SimpleTxnBuffer(m_resultQueue);
}
- for (uint32_t numMsgs=0; numMsgs<m_perfTestParams.m_numMsgs; ++numMsgs) {
+ for (uint32_t numMsgs=0; numMsgs<m_perfTestParams.m_numMsgs && !m_stopFlag; ++numMsgs) {
boost::intrusive_ptr<qpid::broker::SimpleMessage> msg(new qpid::broker::SimpleMessage(m_msgData, m_perfTestParams.m_msgSize, m_store));
if (useTxns) {
boost::shared_ptr<qpid::broker::SimpleTxnPublish> op(new qpid::broker::SimpleTxnPublish(msg));
@@ -79,7 +85,7 @@ MessageProducer::runProducers() {
m_queue->deliver(msg);
}
}
- if (recsInTxnCnt) {
+ if (recsInTxnCnt && !m_stopFlag) {
tb->commitLocal(m_store);
}
return reinterpret_cast<void*>(0);
@@ -87,8 +93,7 @@ MessageProducer::runProducers() {
//static
void*
-MessageProducer::startProducers(void* ptr)
-{
+MessageProducer::startProducers(void* ptr) {
return reinterpret_cast<MessageProducer*>(ptr)->runProducers();
}
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.h?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/MessageProducer.h Thu Aug 2 15:31:51 2012
@@ -49,6 +49,8 @@ public:
qpid::broker::AsyncResultQueue& arq,
boost::shared_ptr<qpid::broker::SimpleQueue> queue);
virtual ~MessageProducer();
+ void stop();
+
void* runProducers();
static void* startProducers(void* ptr);
private:
@@ -57,6 +59,7 @@ private:
qpid::broker::AsyncStore* m_store;
qpid::broker::AsyncResultQueue& m_resultQueue;
boost::shared_ptr<qpid::broker::SimpleQueue> m_queue;
+ bool m_stopFlag;
};
}}} // namespace tests::storePerftools::asyncPerf
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/asyncPerf/PerfTest.cpp Thu Aug 2 15:31:51 2012
@@ -170,33 +170,32 @@ runPerfTest(int argc, char** argv) {
opts.parse(argc, argv);
aso.validate();
to.validate();
- }
- catch (std::exception& e) {
+
+ // Handle options that just print information then exit.
+ if (co.version) {
+ std::cout << tests::storePerftools::name() << " v." << tests::storePerftools::version() << std::endl;
+ return 0;
+ }
+ if (co.help) {
+ std::cout << tests::storePerftools::name() << ": asyncPerf" << std::endl;
+ std::cout << "Performance test for the async store through the qpid async store interface." << std::endl;
+ std::cout << "Usage: asyncPerf [options]" << std::endl;
+ std::cout << opts << std::endl;
+ return 0;
+ }
+
+ // Create and start test
+ tests::storePerftools::asyncPerf::PerfTest apt(to, aso);
+ apt.run();
+
+ // Print test result
+ std::cout << apt << std::endl;
+ //::sleep(1);
+ } catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return 1;
}
- // Handle options that just print information then exit.
- if (co.version) {
- std::cout << tests::storePerftools::name() << " v." << tests::storePerftools::version() << std::endl;
- return 0;
- }
- if (co.help) {
- std::cout << tests::storePerftools::name() << ": asyncPerf" << std::endl;
- std::cout << "Performance test for the async store through the qpid async store interface." << std::endl;
- std::cout << "Usage: asyncPerf [options]" << std::endl;
- std::cout << opts << std::endl;
- return 0;
- }
-
- // Create and start test
- tests::storePerftools::asyncPerf::PerfTest apt(to, aso);
- apt.run();
-
- // Print test result
- std::cout << apt << std::endl;
- //::sleep(1);
-
return 0;
}
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Parameters.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Parameters.h?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Parameters.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Parameters.h Thu Aug 2 15:31:51 2012
@@ -20,6 +20,7 @@
/**
* \file Parameters.h
*/
+
#ifndef tests_storePerftools_common_Parameters_h_
#define tests_storePerftools_common_Parameters_h_
@@ -32,7 +33,7 @@ namespace common {
class Parameters: public Streamable
{
public:
- virtual ~Parameters();
+ virtual ~Parameters() {}
virtual bool parseArg(const int arg,
const char* optarg) = 0;
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.cpp Thu Aug 2 15:31:51 2012
@@ -92,49 +92,41 @@ PerftoolError::PerftoolError(const uint3
m_throwingFunction(throwingFunction)
{}
-PerftoolError::~PerftoolError() throw()
-{}
+PerftoolError::~PerftoolError() throw() {}
const char*
-PerftoolError::what() const throw ()
-{
+PerftoolError::what() const throw () {
return m_what.c_str();
}
uint32_t
-PerftoolError::getErrorCode() const throw ()
-{
+PerftoolError::getErrorCode() const throw () {
return m_errCode;
}
const std::string
-PerftoolError::getAdditionalInfo() const throw ()
-{
+PerftoolError::getAdditionalInfo() const throw () {
return m_errMsg;
}
const std::string
-PerftoolError::getThrowingClass() const throw ()
-{
+PerftoolError::getThrowingClass() const throw () {
return m_throwingClass;
}
const std::string
-PerftoolError::getThrowingFunction() const throw ()
-{
+PerftoolError::getThrowingFunction() const throw () {
return m_throwingFunction;
}
void
-PerftoolError::toStream(std::ostream& os) const
-{
+PerftoolError::toStream(std::ostream& os) const {
os << what();
}
// private
void
-PerftoolError::formatWhatStr() throw ()
-{
+PerftoolError::formatWhatStr() throw () {
try {
const bool ai = !m_errMsg.empty();
const bool tc = !m_throwingClass.empty();
@@ -164,8 +156,7 @@ PerftoolError::formatWhatStr() throw ()
// private
const char*
-PerftoolError::className()
-{
+PerftoolError::className() {
return s_className;
}
@@ -182,8 +173,7 @@ const uint32_t PerftoolError::PERR_PTHRE
// static
const char*
-PerftoolError::s_errorMessage(const uint32_t err_no) throw ()
-{
+PerftoolError::s_errorMessage(const uint32_t err_no) throw () {
s_errorMapIterator = s_errorMap.find(err_no);
if (s_errorMapIterator == s_errorMap.end())
return "<Unknown error code>";
@@ -192,8 +182,7 @@ PerftoolError::s_errorMessage(const uint
// private static
bool
-PerftoolError::s_initialize()
-{
+PerftoolError::s_initialize() {
s_errorMap[PERR_PTHREAD] = "ERR_PTHREAD: pthread operation failure";
return true;
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.h
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.h?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.h (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/PerftoolError.h Thu Aug 2 15:31:51 2012
@@ -61,7 +61,8 @@ namespace tests {
namespace storePerftools {
namespace common {
-class PerftoolError: public std::runtime_error, public Streamable
+class PerftoolError: public std::runtime_error,
+ public Streamable
{
public:
// --- Constructors & destructors ---
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimable.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimable.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimable.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimable.cpp Thu Aug 2 15:31:51 2012
@@ -31,12 +31,10 @@ ScopedTimable::ScopedTimable() :
m_elapsed(0.0)
{}
-ScopedTimable::~ScopedTimable()
-{}
+ScopedTimable::~ScopedTimable() {}
double&
-ScopedTimable::getElapsedRef()
-{
+ScopedTimable::getElapsedRef() {
return m_elapsed;
}
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimer.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimer.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/ScopedTimer.cpp Thu Aug 2 15:31:51 2012
@@ -41,16 +41,14 @@ ScopedTimer::ScopedTimer(ScopedTimable&
::clock_gettime(CLOCK_REALTIME, &m_startTime);
}
-ScopedTimer::~ScopedTimer()
-{
+ScopedTimer::~ScopedTimer() {
::timespec stopTime;
::clock_gettime(CLOCK_REALTIME, &stopTime);
m_elapsed = _s_getDoubleTime(stopTime) - _s_getDoubleTime(m_startTime);
}
// private static
-double ScopedTimer::_s_getDoubleTime(const ::timespec& ts)
-{
+double ScopedTimer::_s_getDoubleTime(const ::timespec& ts) {
return ts.tv_sec + (double(ts.tv_nsec) / 1e9);
}
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Streamable.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Streamable.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Streamable.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/Streamable.cpp Thu Aug 2 15:31:51 2012
@@ -30,23 +30,20 @@ namespace storePerftools {
namespace common {
std::string
-Streamable::toString() const
-{
+Streamable::toString() const {
std::ostringstream oss;
toStream(oss);
return oss.str();
}
std::ostream&
-operator<<(std::ostream& os, const Streamable& s)
-{
+operator<<(std::ostream& os, const Streamable& s) {
s.toStream(os);
return os;
}
std::ostream&
-operator<<(std::ostream& os, const Streamable* sPtr)
-{
+operator<<(std::ostream& os, const Streamable* sPtr) {
sPtr->toStream(os);
return os;
}
Modified: qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestOptions.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestOptions.cpp?rev=1368541&r1=1368540&r2=1368541&view=diff
==============================================================================
--- qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestOptions.cpp (original)
+++ qpid/branches/asyncstore/cpp/src/tests/storePerftools/common/TestOptions.cpp Thu Aug 2 15:31:51 2012
@@ -61,12 +61,10 @@ TestOptions::TestOptions(const uint32_t
doAddOptions();
}
-TestOptions::~TestOptions()
-{}
+TestOptions::~TestOptions() {}
void
-TestOptions::printVals(std::ostream& os) const
-{
+TestOptions::printVals(std::ostream& os) const {
os << "TEST OPTIONS:" << std::endl;
os << " Number of queues [-q, --num-queues]: " << m_numQueues << std::endl;
os << " Number of producers per queue [-p, --num-producers]: " << m_numEnqThreadsPerQueue << std::endl;
@@ -76,8 +74,7 @@ TestOptions::printVals(std::ostream& os)
}
void
-TestOptions::validate()
-{
+TestOptions::validate() {
if (((m_numEnqThreadsPerQueue * m_numMsgs) % m_numDeqThreadsPerQueue) != 0) {
throw qpid::Exception("Parameter Error: (num-producers * num-msgs) must be a multiple of num-consumers.");
}
@@ -85,8 +82,7 @@ TestOptions::validate()
// private
void
-TestOptions::doAddOptions()
-{
+TestOptions::doAddOptions() {
addOptions()
("num-queues,q", qpid::optValue(m_numQueues, "N"),
"Number of queues")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org