summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/asyncStore
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/asyncStore')
-rw-r--r--cpp/src/qpid/asyncStore/AsyncOperation.cpp8
-rw-r--r--cpp/src/qpid/asyncStore/AsyncOperation.h12
-rw-r--r--cpp/src/qpid/asyncStore/AsyncStoreHandle.h37
-rw-r--r--cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp114
-rw-r--r--cpp/src/qpid/asyncStore/AsyncStoreImpl.h40
-rw-r--r--cpp/src/qpid/asyncStore/AsyncStoreOptions.h8
-rw-r--r--cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp2
-rw-r--r--cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp2
-rw-r--r--cpp/src/qpid/asyncStore/EnqueueHandleImpl.h1
-rw-r--r--cpp/src/qpid/asyncStore/EventHandleImpl.cpp2
-rw-r--r--cpp/src/qpid/asyncStore/EventHandleImpl.h1
-rw-r--r--cpp/src/qpid/asyncStore/MessageHandleImpl.cpp2
-rw-r--r--cpp/src/qpid/asyncStore/MessageHandleImpl.h1
-rw-r--r--cpp/src/qpid/asyncStore/OperationQueue.cpp8
-rw-r--r--cpp/src/qpid/asyncStore/OperationQueue.h2
-rw-r--r--cpp/src/qpid/asyncStore/Plugin.cpp2
-rw-r--r--cpp/src/qpid/asyncStore/Plugin.h4
-rw-r--r--cpp/src/qpid/asyncStore/QueueHandleImpl.cpp2
-rw-r--r--cpp/src/qpid/asyncStore/RunState.h2
-rw-r--r--cpp/src/qpid/asyncStore/TxnHandleImpl.cpp4
20 files changed, 129 insertions, 125 deletions
diff --git a/cpp/src/qpid/asyncStore/AsyncOperation.cpp b/cpp/src/qpid/asyncStore/AsyncOperation.cpp
index bcaac5c548..b8fdb8b140 100644
--- a/cpp/src/qpid/asyncStore/AsyncOperation.cpp
+++ b/cpp/src/qpid/asyncStore/AsyncOperation.cpp
@@ -38,7 +38,7 @@ AsyncOperation::AsyncOperation() :
{}
AsyncOperation::AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
m_op(op),
m_targetHandle(th),
@@ -48,7 +48,7 @@ AsyncOperation::AsyncOperation(const opCode op,
{}
AsyncOperation::AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
const qpid::broker::DataSource* const dataSrc,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
m_op(op),
@@ -59,7 +59,7 @@ AsyncOperation::AsyncOperation(const opCode op,
{}
AsyncOperation::AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
const qpid::broker::TxnHandle* txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
m_op(op),
@@ -70,7 +70,7 @@ AsyncOperation::AsyncOperation(const opCode op,
{}
AsyncOperation::AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
const qpid::broker::DataSource* const dataSrc,
const qpid::broker::TxnHandle* txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt) :
diff --git a/cpp/src/qpid/asyncStore/AsyncOperation.h b/cpp/src/qpid/asyncStore/AsyncOperation.h
index 188750e910..cb73ad639b 100644
--- a/cpp/src/qpid/asyncStore/AsyncOperation.h
+++ b/cpp/src/qpid/asyncStore/AsyncOperation.h
@@ -25,10 +25,10 @@
#define qpid_asyncStore_AsyncOperation_h_
#include "qpid/broker/AsyncStore.h"
-#include "qpid/broker/IdHandle.h"
namespace qpid {
namespace asyncStore {
+class AsyncStoreHandle;
class AsyncOperation {
public:
@@ -49,18 +49,18 @@ public:
AsyncOperation();
AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
const qpid::broker::DataSource* const dataSrc,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
const qpid::broker::TxnHandle* txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
AsyncOperation(const opCode op,
- const qpid::broker::IdHandle* th,
+ const AsyncStoreHandle* th,
const qpid::broker::DataSource* const dataSrc,
const qpid::broker::TxnHandle* txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
@@ -71,7 +71,7 @@ public:
private:
opCode m_op;
- const qpid::broker::IdHandle* m_targetHandle;
+ const AsyncStoreHandle* m_targetHandle;
const qpid::broker::DataSource* const m_dataSrc;
const qpid::broker::TxnHandle* m_txnHandle;
boost::shared_ptr<qpid::broker::BrokerAsyncContext> const m_brokerCtxt;
diff --git a/cpp/src/qpid/asyncStore/AsyncStoreHandle.h b/cpp/src/qpid/asyncStore/AsyncStoreHandle.h
new file mode 100644
index 0000000000..97111d1b84
--- /dev/null
+++ b/cpp/src/qpid/asyncStore/AsyncStoreHandle.h
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * \file AsyncStoreHandle.h
+ */
+
+#ifndef qpid_asyncStore_AsyncStoreHandle_h_
+#define qpid_asyncStore_AsyncStoreHandle_h_
+
+namespace qpid {
+namespace asyncStore {
+
+class AsyncStoreHandle {
+public:
+ virtual ~AsyncStoreHandle() {}
+};
+
+}} // namespace qpid::asyncStore
+
+#endif // qpid_asyncStore_AsyncStoreHandle_h_
diff --git a/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp b/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
index 9135fcc27e..6b5c3ac582 100644
--- a/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
+++ b/cpp/src/qpid/asyncStore/AsyncStoreImpl.cpp
@@ -23,7 +23,11 @@
#include "AsyncStoreImpl.h"
-#include "AsyncOperation.h"
+#include "ConfigHandleImpl.h"
+#include "EnqueueHandleImpl.h"
+#include "EventHandleImpl.h"
+#include "MessageHandleImpl.h"
+#include "QueueHandleImpl.h"
#include "TxnHandleImpl.h"
#include "qpid/broker/ConfigHandle.h"
@@ -33,8 +37,6 @@
#include "qpid/broker/QueueHandle.h"
#include "qpid/broker/TxnHandle.h"
-#include <boost/intrusive_ptr.hpp>
-
namespace qpid {
namespace asyncStore {
@@ -88,6 +90,36 @@ AsyncStoreImpl::createTxnHandle(const std::string& xid,
return qpid::broker::TxnHandle(new TxnHandleImpl(xid, tb));
}
+void
+AsyncStoreImpl::submitPrepare(qpid::broker::TxnHandle& txnHandle,
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+{
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_PREPARE,
+ dynamic_cast<AsyncStoreHandle*>(&txnHandle),
+ brokerCtxt));
+ m_operations.submit(op);
+}
+
+void
+AsyncStoreImpl::submitCommit(qpid::broker::TxnHandle& txnHandle,
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+{
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_COMMIT,
+ dynamic_cast<AsyncStoreHandle*>(&txnHandle),
+ brokerCtxt));
+ m_operations.submit(op);
+}
+
+void
+AsyncStoreImpl::submitAbort(qpid::broker::TxnHandle& txnHandle,
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
+{
+ boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_ABORT,
+ dynamic_cast<AsyncStoreHandle*>(&txnHandle),
+ brokerCtxt));
+ m_operations.submit(op);
+}
+
qpid::broker::ConfigHandle
AsyncStoreImpl::createConfigHandle()
{
@@ -98,14 +130,16 @@ qpid::broker::EnqueueHandle
AsyncStoreImpl::createEnqueueHandle(qpid::broker::MessageHandle& msgHandle,
qpid::broker::QueueHandle& queueHandle)
{
- return qpid::broker::EnqueueHandle(new EnqueueHandleImpl(msgHandle, queueHandle));
+ return qpid::broker::EnqueueHandle(new EnqueueHandleImpl(msgHandle,
+ queueHandle));
}
qpid::broker::EventHandle
AsyncStoreImpl::createEventHandle(qpid::broker::QueueHandle& queueHandle,
const std::string& key)
{
- return qpid::broker::EventHandle(new EventHandleImpl(queueHandle, key));
+ return qpid::broker::EventHandle(new EventHandleImpl(queueHandle,
+ key));
}
qpid::broker::MessageHandle
@@ -123,42 +157,12 @@ AsyncStoreImpl::createQueueHandle(const std::string& name,
}
void
-AsyncStoreImpl::submitPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_PREPARE,
- dynamic_cast<qpid::broker::IdHandle*>(&txnHandle),
- brokerCtxt));
- m_operations.submit(op);
-}
-
-void
-AsyncStoreImpl::submitCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_COMMIT,
- dynamic_cast<qpid::broker::IdHandle*>(&txnHandle),
- brokerCtxt));
- m_operations.submit(op);
-}
-
-void
-AsyncStoreImpl::submitAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::TXN_ABORT,
- dynamic_cast<qpid::broker::IdHandle*>(&txnHandle),
- brokerCtxt));
- m_operations.submit(op);
-}
-
-void
AsyncStoreImpl::submitCreate(qpid::broker::ConfigHandle& cfgHandle,
const qpid::broker::DataSource* const dataSrc,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::CONFIG_CREATE,
- dynamic_cast<qpid::broker::IdHandle*>(&cfgHandle),
+ dynamic_cast<AsyncStoreHandle*>(&cfgHandle),
dataSrc,
brokerCtxt));
m_operations.submit(op);
@@ -169,7 +173,7 @@ AsyncStoreImpl::submitDestroy(qpid::broker::ConfigHandle& cfgHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::CONFIG_DESTROY,
- dynamic_cast<qpid::broker::IdHandle*>(&cfgHandle),
+ dynamic_cast<AsyncStoreHandle*>(&cfgHandle),
brokerCtxt));
m_operations.submit(op);
}
@@ -180,7 +184,7 @@ AsyncStoreImpl::submitCreate(qpid::broker::QueueHandle& queueHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::QUEUE_CREATE,
- dynamic_cast<qpid::broker::IdHandle*>(&queueHandle),
+ dynamic_cast<AsyncStoreHandle*>(&queueHandle),
dataSrc,
brokerCtxt));
m_operations.submit(op);
@@ -191,7 +195,7 @@ AsyncStoreImpl::submitDestroy(qpid::broker::QueueHandle& queueHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::QUEUE_DESTROY,
- dynamic_cast<qpid::broker::IdHandle*>(&queueHandle),
+ dynamic_cast<AsyncStoreHandle*>(&queueHandle),
brokerCtxt));
m_operations.submit(op);
}
@@ -201,19 +205,7 @@ AsyncStoreImpl::submitFlush(qpid::broker::QueueHandle& queueHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::QUEUE_FLUSH,
- dynamic_cast<qpid::broker::IdHandle*>(&queueHandle),
- brokerCtxt));
- m_operations.submit(op);
-}
-
-void
-AsyncStoreImpl::submitCreate(qpid::broker::EventHandle& eventHandle,
- const qpid::broker::DataSource* const dataSrc,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::EVENT_CREATE,
- dynamic_cast<qpid::broker::IdHandle*>(&eventHandle),
- dataSrc,
+ dynamic_cast<AsyncStoreHandle*>(&queueHandle),
brokerCtxt));
m_operations.submit(op);
}
@@ -225,7 +217,7 @@ AsyncStoreImpl::submitCreate(qpid::broker::EventHandle& eventHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::EVENT_CREATE,
- dynamic_cast<qpid::broker::IdHandle*>(&eventHandle),
+ dynamic_cast<AsyncStoreHandle*>(&eventHandle),
dataSrc,
&txnHandle,
brokerCtxt));
@@ -234,21 +226,11 @@ AsyncStoreImpl::submitCreate(qpid::broker::EventHandle& eventHandle,
void
AsyncStoreImpl::submitDestroy(qpid::broker::EventHandle& eventHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
-{
- boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::EVENT_DESTROY,
- dynamic_cast<qpid::broker::IdHandle*>(&eventHandle),
- brokerCtxt));
- m_operations.submit(op);
-}
-
-void
-AsyncStoreImpl::submitDestroy(qpid::broker::EventHandle& eventHandle,
qpid::broker::TxnHandle& txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::EVENT_DESTROY,
- dynamic_cast<qpid::broker::IdHandle*>(&eventHandle),
+ dynamic_cast<AsyncStoreHandle*>(&eventHandle),
&txnHandle,
brokerCtxt));
m_operations.submit(op);
@@ -260,7 +242,7 @@ AsyncStoreImpl::submitEnqueue(qpid::broker::EnqueueHandle& enqHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::MSG_ENQUEUE,
- dynamic_cast<qpid::broker::IdHandle*>(&enqHandle),
+ dynamic_cast<AsyncStoreHandle*>(&enqHandle),
&txnHandle,
brokerCtxt));
m_operations.submit(op);
@@ -272,7 +254,7 @@ AsyncStoreImpl::submitDequeue(qpid::broker::EnqueueHandle& enqHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt)
{
boost::shared_ptr<const AsyncOperation> op(new AsyncOperation(AsyncOperation::MSG_DEQUEUE,
- dynamic_cast<qpid::broker::IdHandle*>(&enqHandle),
+ dynamic_cast<AsyncStoreHandle*>(&enqHandle),
&txnHandle,
brokerCtxt));
m_operations.submit(op);
diff --git a/cpp/src/qpid/asyncStore/AsyncStoreImpl.h b/cpp/src/qpid/asyncStore/AsyncStoreImpl.h
index a00771abf5..7dee03dc6d 100644
--- a/cpp/src/qpid/asyncStore/AsyncStoreImpl.h
+++ b/cpp/src/qpid/asyncStore/AsyncStoreImpl.h
@@ -30,17 +30,19 @@
#include "qpid/asyncStore/jrnl2/RecordIdCounter.h"
#include "qpid/broker/AsyncStore.h"
-#include "qpid/sys/Poller.h"
namespace qpid {
-
namespace broker {
class Broker;
-} // namespace qpid::broker
+}
+
+namespace sys {
+class Poller;
+}
namespace asyncStore {
-class AsyncStoreImpl: public qpid::broker::AsyncStore {
+class AsyncStoreImpl : public qpid::broker::AsyncStore {
public:
AsyncStoreImpl(boost::shared_ptr<qpid::sys::Poller> poller,
const AsyncStoreOptions& opts);
@@ -52,12 +54,23 @@ public:
void initManagement(qpid::broker::Broker* broker);
- // --- Factory methods for creating handles ---
+ // --- Interface from AsyncTransactionalStore ---
qpid::broker::TxnHandle createTxnHandle();
qpid::broker::TxnHandle createTxnHandle(qpid::broker::TxnBuffer* tb);
qpid::broker::TxnHandle createTxnHandle(const std::string& xid);
- qpid::broker::TxnHandle createTxnHandle(const std::string& xid, qpid::broker::TxnBuffer* tb);
+ qpid::broker::TxnHandle createTxnHandle(const std::string& xid,
+ qpid::broker::TxnBuffer* tb);
+
+ void submitPrepare(qpid::broker::TxnHandle& txnHandle,
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ void submitCommit(qpid::broker::TxnHandle& txnHandle,
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+ void submitAbort(qpid::broker::TxnHandle& txnHandle,
+ boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
+
+
+ // --- Interface from AsyncStore ---
qpid::broker::ConfigHandle createConfigHandle();
qpid::broker::EnqueueHandle createEnqueueHandle(qpid::broker::MessageHandle& msgHandle,
@@ -68,16 +81,6 @@ public:
qpid::broker::QueueHandle createQueueHandle(const std::string& name,
const qpid::types::Variant::Map& opts);
-
- // --- Store async interface ---
-
- void submitPrepare(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
- void submitCommit(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
- void submitAbort(qpid::broker::TxnHandle& txnHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
-
void submitCreate(qpid::broker::ConfigHandle& cfgHandle,
const qpid::broker::DataSource* const dataSrc,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
@@ -94,14 +97,9 @@ public:
void submitCreate(qpid::broker::EventHandle& eventHandle,
const qpid::broker::DataSource* const dataSrc,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
- void submitCreate(qpid::broker::EventHandle& eventHandle,
- const qpid::broker::DataSource* const dataSrc,
qpid::broker::TxnHandle& txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
void submitDestroy(qpid::broker::EventHandle& eventHandle,
- boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
- void submitDestroy(qpid::broker::EventHandle& eventHandle,
qpid::broker::TxnHandle& txnHandle,
boost::shared_ptr<qpid::broker::BrokerAsyncContext> brokerCtxt);
diff --git a/cpp/src/qpid/asyncStore/AsyncStoreOptions.h b/cpp/src/qpid/asyncStore/AsyncStoreOptions.h
index 2849e3d2c6..a1325839d9 100644
--- a/cpp/src/qpid/asyncStore/AsyncStoreOptions.h
+++ b/cpp/src/qpid/asyncStore/AsyncStoreOptions.h
@@ -24,16 +24,11 @@
#ifndef qpid_asyncStore_AsyncStoreOptions_h_
#define qpid_asyncStore_AsyncStoreOptions_h_
-#include "qpid/asyncStore/jrnl2/Streamable.h"
-
#include "qpid/Options.h"
#include <string>
namespace qpid {
-namespace broker {
-class Options;
-}
namespace asyncStore {
class AsyncStoreOptions : public qpid::Options
@@ -49,7 +44,8 @@ public:
std::string m_storeDir;
private:
- // Static initialization race condition avoidance with static instance of Plugin class (using construct-on-first-use idiom).
+ // Static initialization race condition avoidance with static instance of Plugin class
+ // (using construct-on-first-use idiom).
static std::string& getDefaultStoreDir();
};
diff --git a/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp b/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp
index 64e2e848fa..fc47f330a4 100644
--- a/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp
+++ b/cpp/src/qpid/asyncStore/ConfigHandleImpl.cpp
@@ -23,8 +23,6 @@
#include "ConfigHandleImpl.h"
-#include "qpid/messaging/PrivateImplRef.h"
-
namespace qpid {
namespace asyncStore {
diff --git a/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp b/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp
index 0e291def78..be87831520 100644
--- a/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp
+++ b/cpp/src/qpid/asyncStore/EnqueueHandleImpl.cpp
@@ -23,8 +23,6 @@
#include "EnqueueHandleImpl.h"
-#include "qpid/messaging/PrivateImplRef.h"
-
namespace qpid {
namespace asyncStore {
diff --git a/cpp/src/qpid/asyncStore/EnqueueHandleImpl.h b/cpp/src/qpid/asyncStore/EnqueueHandleImpl.h
index f976b6d246..2788366c5c 100644
--- a/cpp/src/qpid/asyncStore/EnqueueHandleImpl.h
+++ b/cpp/src/qpid/asyncStore/EnqueueHandleImpl.h
@@ -27,7 +27,6 @@
#include "qpid/RefCounted.h"
namespace qpid {
-
namespace broker {
class MessageHandle;
class QueueHandle;
diff --git a/cpp/src/qpid/asyncStore/EventHandleImpl.cpp b/cpp/src/qpid/asyncStore/EventHandleImpl.cpp
index 05b98d1e5d..4fd8805912 100644
--- a/cpp/src/qpid/asyncStore/EventHandleImpl.cpp
+++ b/cpp/src/qpid/asyncStore/EventHandleImpl.cpp
@@ -23,8 +23,6 @@
#include "EventHandleImpl.h"
-#include "qpid/messaging/PrivateImplRef.h"
-
namespace qpid {
namespace asyncStore {
diff --git a/cpp/src/qpid/asyncStore/EventHandleImpl.h b/cpp/src/qpid/asyncStore/EventHandleImpl.h
index 1c6bc52f9f..9a0e694d12 100644
--- a/cpp/src/qpid/asyncStore/EventHandleImpl.h
+++ b/cpp/src/qpid/asyncStore/EventHandleImpl.h
@@ -27,7 +27,6 @@
#include "qpid/RefCounted.h"
namespace qpid {
-
namespace broker {
class QueueHandle;
}
diff --git a/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp b/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp
index cea039221a..a926aa161f 100644
--- a/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp
+++ b/cpp/src/qpid/asyncStore/MessageHandleImpl.cpp
@@ -23,8 +23,6 @@
#include "MessageHandleImpl.h"
-#include "qpid/messaging/PrivateImplRef.h"
-
namespace qpid {
namespace asyncStore {
diff --git a/cpp/src/qpid/asyncStore/MessageHandleImpl.h b/cpp/src/qpid/asyncStore/MessageHandleImpl.h
index eb80fca2d4..ded9d63375 100644
--- a/cpp/src/qpid/asyncStore/MessageHandleImpl.h
+++ b/cpp/src/qpid/asyncStore/MessageHandleImpl.h
@@ -27,7 +27,6 @@
#include "qpid/RefCounted.h"
namespace qpid {
-
namespace broker {
class DataSource;
}
diff --git a/cpp/src/qpid/asyncStore/OperationQueue.cpp b/cpp/src/qpid/asyncStore/OperationQueue.cpp
index 0b7f58bd6c..dd4e7c1343 100644
--- a/cpp/src/qpid/asyncStore/OperationQueue.cpp
+++ b/cpp/src/qpid/asyncStore/OperationQueue.cpp
@@ -24,6 +24,8 @@
#include "OperationQueue.h"
#include "qpid/broker/AsyncResultHandle.h"
+#include "qpid/broker/AsyncResultHandleImpl.h"
+#include "qpid/log/Statement.h"
namespace qpid {
namespace asyncStore {
@@ -42,7 +44,6 @@ OperationQueue::~OperationQueue()
void
OperationQueue::submit(boost::shared_ptr<const AsyncOperation> op)
{
-//std::cout << "--> OperationQueue::submit() op=" << op->getOpStr() << std::endl << std::flush;
m_opQueue.push(op);
}
@@ -52,7 +53,6 @@ OperationQueue::handle(const OperationQueue::OpQueue::Batch& e)
{
try {
for (OpQueue::Batch::const_iterator i = e.begin(); i != e.end(); ++i) {
-//std::cout << "<-- OperationQueue::handle() Op=" << (*i)->getOpStr() << std::endl << std::flush;
boost::shared_ptr<qpid::broker::BrokerAsyncContext> bc = (*i)->getBrokerContext();
if (bc) {
qpid::broker::AsyncResultQueue* const arq = bc->getAsyncResultQueue();
@@ -64,9 +64,9 @@ OperationQueue::handle(const OperationQueue::OpQueue::Batch& e)
}
}
} catch (const std::exception& e) {
- std::cerr << "qpid::asyncStore::OperationQueue: Exception thrown processing async op: " << e.what() << std::endl;
+ QPID_LOG(error, "qpid::asyncStore::OperationQueue: Exception thrown processing async op: " << e.what());
} catch (...) {
- std::cerr << "qpid::asyncStore::OperationQueue: Unknown exception thrown processing async op" << std::endl;
+ QPID_LOG(error, "qpid::asyncStore::OperationQueue: Unknown exception thrown processing async op");
}
return e.end();
}
diff --git a/cpp/src/qpid/asyncStore/OperationQueue.h b/cpp/src/qpid/asyncStore/OperationQueue.h
index d2bd5d0f26..143ac2ab0c 100644
--- a/cpp/src/qpid/asyncStore/OperationQueue.h
+++ b/cpp/src/qpid/asyncStore/OperationQueue.h
@@ -26,7 +26,7 @@
#include "AsyncOperation.h"
-#include "qpid/broker/AsyncStore.h"
+//#include "qpid/broker/AsyncStore.h"
#include "qpid/sys/PollableQueue.h"
namespace qpid {
diff --git a/cpp/src/qpid/asyncStore/Plugin.cpp b/cpp/src/qpid/asyncStore/Plugin.cpp
index 4f35e8cd2a..400237df75 100644
--- a/cpp/src/qpid/asyncStore/Plugin.cpp
+++ b/cpp/src/qpid/asyncStore/Plugin.cpp
@@ -23,6 +23,8 @@
#include "Plugin.h"
+#include "AsyncStoreImpl.h"
+
#include "qpid/broker/Broker.h"
namespace qpid {
diff --git a/cpp/src/qpid/asyncStore/Plugin.h b/cpp/src/qpid/asyncStore/Plugin.h
index 7cf500a122..7d2b67bdad 100644
--- a/cpp/src/qpid/asyncStore/Plugin.h
+++ b/cpp/src/qpid/asyncStore/Plugin.h
@@ -24,13 +24,15 @@
#ifndef qpid_broker_Plugin_h_
#define qpid_broker_Plugin_h_
-#include "AsyncStoreImpl.h"
#include "AsyncStoreOptions.h"
#include "qpid/Plugin.h"
namespace qpid {
class Options;
+namespace asyncStore {
+class AsyncStoreImpl;
+}
namespace broker {
class Plugin : public qpid::Plugin
diff --git a/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp b/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp
index 523a31ba7b..3781329b92 100644
--- a/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp
+++ b/cpp/src/qpid/asyncStore/QueueHandleImpl.cpp
@@ -23,8 +23,6 @@
#include "QueueHandleImpl.h"
-#include "qpid/messaging/PrivateImplRef.h"
-
namespace qpid {
namespace asyncStore {
diff --git a/cpp/src/qpid/asyncStore/RunState.h b/cpp/src/qpid/asyncStore/RunState.h
index dfa331ea1a..832e922a04 100644
--- a/cpp/src/qpid/asyncStore/RunState.h
+++ b/cpp/src/qpid/asyncStore/RunState.h
@@ -59,7 +59,7 @@ typedef enum {
RS_STOPPED
} RunState_t;
-class RunState: public qpid::asyncStore::jrnl2::State<RunState_t>
+class RunState : public qpid::asyncStore::jrnl2::State<RunState_t>
{
public:
RunState();
diff --git a/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp b/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp
index c5371f161c..2b343e9517 100644
--- a/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp
+++ b/cpp/src/qpid/asyncStore/TxnHandleImpl.cpp
@@ -25,7 +25,7 @@
#include "qpid/Exception.h"
#include "qpid/broker/TxnBuffer.h"
-#include "qpid/messaging/PrivateImplRef.h"
+#include "qpid/log/Statement.h"
#include <uuid/uuid.h>
@@ -117,7 +117,7 @@ TxnHandleImpl::createLocalXid()
char uuidStr[37]; // 36-char uuid + trailing '\0'
::uuid_unparse(uuid, uuidStr);
m_xid.assign(uuidStr);
-//std::cout << "TTT TxnHandleImpl::createLocalXid(): Local XID created: \"" << m_xid << "\"" << std::endl << std::flush;
+ QPID_LOG(debug, "Local XID created: \"" << m_xid << "\"");
}
}} // namespace qpid::asyncStore