summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2013-08-21 21:22:06 +0000
committerKim van der Riet <kpvdr@apache.org>2013-08-21 21:22:06 +0000
commit2c39e4c4da4d727bdca8ce6d3ff8a9d570a04b22 (patch)
treed058670d26ed416cf82491633a5a813e9f70f779 /qpid/cpp/src
parent341696dbb845dc620e2c916b30e312e7f47c3388 (diff)
downloadqpid-python-2c39e4c4da4d727bdca8ce6d3ff8a9d570a04b22.tar.gz
QPID-4984: WIP - compiles, but not functional. Changed namespaces in project.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/linearstore@1516306 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/linearstore/BindingDbt.cpp4
-rw-r--r--qpid/cpp/src/qpid/linearstore/BindingDbt.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/BufferValue.cpp4
-rw-r--r--qpid/cpp/src/qpid/linearstore/BufferValue.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/Cursor.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/DataTokenImpl.cpp2
-rw-r--r--qpid/cpp/src/qpid/linearstore/DataTokenImpl.h6
-rw-r--r--qpid/cpp/src/qpid/linearstore/IdDbt.cpp2
-rw-r--r--qpid/cpp/src/qpid/linearstore/IdDbt.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/IdSequence.cpp2
-rw-r--r--qpid/cpp/src/qpid/linearstore/IdSequence.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/JournalImpl.cpp42
-rw-r--r--qpid/cpp/src/qpid/linearstore/JournalImpl.h49
-rw-r--r--qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp74
-rw-r--r--qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/PreparedTransaction.cpp2
-rw-r--r--qpid/cpp/src/qpid/linearstore/PreparedTransaction.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/StoreException.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/StorePlugin.cpp2
-rw-r--r--qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp14
-rw-r--r--qpid/cpp/src/qpid/linearstore/TxnCtxt.h4
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/aio.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/aio_callback.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/cvar.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/data_tok.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/data_tok.h16
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp4
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.h11
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/enq_map.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/enq_map.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/enums.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jcntl.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jcntl.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jdir.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jdir.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jerrno.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jerrno.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jexception.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jexception.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jrec.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/jrec.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/pmgr.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/pmgr.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/rcvdat.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/rmgr.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/rmgr.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/slock.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/smutex.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/time_ns.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/time_ns.h7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/txn_map.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/txn_map.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.h14
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.h8
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.h8
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.h8
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.h8
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.h8
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.h8
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/wmgr.cpp7
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/wmgr.h14
64 files changed, 320 insertions, 320 deletions
diff --git a/qpid/cpp/src/qpid/linearstore/BindingDbt.cpp b/qpid/cpp/src/qpid/linearstore/BindingDbt.cpp
index d50009c82e..47738cce39 100644
--- a/qpid/cpp/src/qpid/linearstore/BindingDbt.cpp
+++ b/qpid/cpp/src/qpid/linearstore/BindingDbt.cpp
@@ -21,8 +21,8 @@
#include "qpid/linearstore/BindingDbt.h"
-namespace mrg {
-namespace msgstore {
+namespace qpid {
+namespace linearstore {
BindingDbt::BindingDbt(const qpid::broker::PersistableExchange& e, const qpid::broker::PersistableQueue& q, const std::string& k, const qpid::framing::FieldTable& a)
: data(new char[encodedSize(e, q, k, a)]),
diff --git a/qpid/cpp/src/qpid/linearstore/BindingDbt.h b/qpid/cpp/src/qpid/linearstore/BindingDbt.h
index 63c7cd144e..7297ea7c7c 100644
--- a/qpid/cpp/src/qpid/linearstore/BindingDbt.h
+++ b/qpid/cpp/src/qpid/linearstore/BindingDbt.h
@@ -28,8 +28,8 @@
#include "qpid/framing/Buffer.h"
#include "qpid/framing/FieldTable.h"
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
class BindingDbt : public Dbt
{
diff --git a/qpid/cpp/src/qpid/linearstore/BufferValue.cpp b/qpid/cpp/src/qpid/linearstore/BufferValue.cpp
index 4bed7d426a..f78cb46af0 100644
--- a/qpid/cpp/src/qpid/linearstore/BufferValue.cpp
+++ b/qpid/cpp/src/qpid/linearstore/BufferValue.cpp
@@ -21,8 +21,8 @@
#include "qpid/linearstore/BufferValue.h"
-namespace mrg {
-namespace msgstore {
+namespace qpid {
+namespace linearstore {
diff --git a/qpid/cpp/src/qpid/linearstore/BufferValue.h b/qpid/cpp/src/qpid/linearstore/BufferValue.h
index 527fbcf577..bbd6a5b88d 100644
--- a/qpid/cpp/src/qpid/linearstore/BufferValue.h
+++ b/qpid/cpp/src/qpid/linearstore/BufferValue.h
@@ -26,8 +26,8 @@
#include "qpid/broker/Persistable.h"
#include "qpid/framing/Buffer.h"
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
class BufferValue : public Dbt
{
diff --git a/qpid/cpp/src/qpid/linearstore/Cursor.h b/qpid/cpp/src/qpid/linearstore/Cursor.h
index 0c869c29a0..3f3023c46c 100644
--- a/qpid/cpp/src/qpid/linearstore/Cursor.h
+++ b/qpid/cpp/src/qpid/linearstore/Cursor.h
@@ -25,8 +25,8 @@
#include <boost/shared_ptr.hpp>
#include "db-inc.h"
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
class Cursor
{
diff --git a/qpid/cpp/src/qpid/linearstore/DataTokenImpl.cpp b/qpid/cpp/src/qpid/linearstore/DataTokenImpl.cpp
index c16466b05e..0b1f3d7941 100644
--- a/qpid/cpp/src/qpid/linearstore/DataTokenImpl.cpp
+++ b/qpid/cpp/src/qpid/linearstore/DataTokenImpl.cpp
@@ -21,7 +21,7 @@
#include "qpid/linearstore/DataTokenImpl.h"
-using namespace mrg::msgstore;
+using namespace qpid::linearstore;
DataTokenImpl::DataTokenImpl():data_tok() {}
diff --git a/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h b/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h
index 3c8b6cbd12..17de01d237 100644
--- a/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h
+++ b/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h
@@ -26,10 +26,10 @@
#include "qpid/broker/PersistableMessage.h"
#include <boost/intrusive_ptr.hpp>
-namespace mrg {
-namespace msgstore {
+namespace qpid{
+namespace linearstore{
-class DataTokenImpl : public journal::data_tok, public qpid::RefCounted
+class DataTokenImpl : public qpid::qls_jrnl::data_tok, public qpid::RefCounted
{
private:
boost::intrusive_ptr<qpid::broker::PersistableMessage> sourceMsg;
diff --git a/qpid/cpp/src/qpid/linearstore/IdDbt.cpp b/qpid/cpp/src/qpid/linearstore/IdDbt.cpp
index 2308d074bc..075234acb9 100644
--- a/qpid/cpp/src/qpid/linearstore/IdDbt.cpp
+++ b/qpid/cpp/src/qpid/linearstore/IdDbt.cpp
@@ -21,7 +21,7 @@
#include "qpid/linearstore/IdDbt.h"
-using namespace mrg::msgstore;
+using namespace qpid::linearstore;
IdDbt::IdDbt() : id(0)
{
diff --git a/qpid/cpp/src/qpid/linearstore/IdDbt.h b/qpid/cpp/src/qpid/linearstore/IdDbt.h
index ecf5922963..0a5b0d782d 100644
--- a/qpid/cpp/src/qpid/linearstore/IdDbt.h
+++ b/qpid/cpp/src/qpid/linearstore/IdDbt.h
@@ -24,8 +24,8 @@
#include "db-inc.h"
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
class IdDbt : public Dbt
{
diff --git a/qpid/cpp/src/qpid/linearstore/IdSequence.cpp b/qpid/cpp/src/qpid/linearstore/IdSequence.cpp
index 9034a11fd2..4ad40f5329 100644
--- a/qpid/cpp/src/qpid/linearstore/IdSequence.cpp
+++ b/qpid/cpp/src/qpid/linearstore/IdSequence.cpp
@@ -21,7 +21,7 @@
#include "qpid/linearstore/IdSequence.h"
-using namespace mrg::msgstore;
+using namespace qpid::linearstore;
using qpid::sys::Mutex;
IdSequence::IdSequence() : id(1) {}
diff --git a/qpid/cpp/src/qpid/linearstore/IdSequence.h b/qpid/cpp/src/qpid/linearstore/IdSequence.h
index 11d7ff61ca..06f3db3f1e 100644
--- a/qpid/cpp/src/qpid/linearstore/IdSequence.h
+++ b/qpid/cpp/src/qpid/linearstore/IdSequence.h
@@ -26,8 +26,8 @@
#include "qpid/sys/Mutex.h"
#include <sys/types.h>
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
class IdSequence
{
diff --git a/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp b/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp
index 1cc9f3f08c..ea091ae941 100644
--- a/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp
+++ b/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp
@@ -34,8 +34,8 @@
#include "qpid/sys/Timer.h"
#include "qpid/linearstore/StoreException.h"
-using namespace mrg::msgstore;
-using namespace mrg::journal;
+using namespace qpid::qls_jrnl;
+using namespace qpid::linearstore;
using qpid::management::ManagementAgent;
namespace _qmf = qmf::org::apache::qpid::linearstore;
@@ -138,7 +138,7 @@ JournalImpl::initialize(/*const u_int16_t num_jfiles,
const u_int32_t jfsize_sblks,*/
const u_int16_t wcache_num_pages,
const u_int32_t wcache_pgsize_sblks,
- mrg::journal::aio_callback* const cbp)
+ qpid::qls_jrnl::aio_callback* const cbp)
{
std::ostringstream oss;
// oss << "Initialize; num_jfiles=" << num_jfiles << " jfsize_sblks=" << jfsize_sblks;
@@ -173,8 +173,8 @@ JournalImpl::recover(/*const u_int16_t num_jfiles,
const u_int32_t jfsize_sblks,*/
const u_int16_t wcache_num_pages,
const u_int32_t wcache_pgsize_sblks,
- mrg::journal::aio_callback* const cbp,
- boost::ptr_list<msgstore::PreparedTransaction>* prep_tx_list_ptr,
+ qpid::qls_jrnl::aio_callback* const cbp,
+ boost::ptr_list<PreparedTransaction>* prep_tx_list_ptr,
u_int64_t& highest_rid,
u_int64_t queue_id)
{
@@ -202,7 +202,7 @@ JournalImpl::recover(/*const u_int16_t num_jfiles,
if (prep_tx_list_ptr) {
// Create list of prepared xids
std::vector<std::string> prep_xid_list;
- for (msgstore::PreparedTransaction::list::iterator i = prep_tx_list_ptr->begin(); i != prep_tx_list_ptr->end(); i++) {
+ for (PreparedTransaction::list::iterator i = prep_tx_list_ptr->begin(); i != prep_tx_list_ptr->end(); i++) {
prep_xid_list.push_back(i->xid);
}
@@ -216,7 +216,7 @@ JournalImpl::recover(/*const u_int16_t num_jfiles,
// Populate PreparedTransaction lists from _tmap
if (prep_tx_list_ptr)
{
- for (msgstore::PreparedTransaction::list::iterator i = prep_tx_list_ptr->begin(); i != prep_tx_list_ptr->end(); i++) {
+ for (PreparedTransaction::list::iterator i = prep_tx_list_ptr->begin(); i != prep_tx_list_ptr->end(); i++) {
txn_data_list tdl = _tmap.get_tdata_list(i->xid); // tdl will be empty if xid not found
for (tdl_itr tdl_itr = tdl.begin(); tdl_itr < tdl.end(); tdl_itr++) {
if (tdl_itr->_enq_flag) { // enqueue op
@@ -298,7 +298,7 @@ JournalImpl::loadMsgContent(u_int64_t rid, std::string& data, size_t length, siz
while (!done) {
iores res = read_data_record(&_datap, _dlen, &_xidp, xlen, transient, _external, &_dtok);
switch (res) {
- case mrg::journal::RHM_IORES_SUCCESS:
+ case qpid::qls_jrnl::RHM_IORES_SUCCESS:
if (_dtok.rid() != rid) {
// Check if this is an out-of-order rid that may impact next read
if (_dtok.rid() > rid)
@@ -315,19 +315,19 @@ JournalImpl::loadMsgContent(u_int64_t rid, std::string& data, size_t length, siz
done = true;
}
break;
- case mrg::journal::RHM_IORES_PAGE_AIOWAIT:
- if (get_wr_events(&_aio_cmpl_timeout) == journal::jerrno::AIO_TIMEOUT) {
+ case qpid::qls_jrnl::RHM_IORES_PAGE_AIOWAIT:
+ if (get_wr_events(&_aio_cmpl_timeout) == qpid::qls_jrnl::jerrno::AIO_TIMEOUT) {
std::stringstream ss;
- ss << "read_data_record() returned " << mrg::journal::iores_str(res);
+ ss << "read_data_record() returned " << qpid::qls_jrnl::iores_str(res);
ss << "; timed out waiting for page to be processed.";
- throw jexception(mrg::journal::jerrno::JERR__TIMEOUT, ss.str().c_str(), "JournalImpl",
+ throw jexception(qpid::qls_jrnl::jerrno::JERR__TIMEOUT, ss.str().c_str(), "JournalImpl",
"loadMsgContent");
}
break;
default:
std::stringstream ss;
- ss << "read_data_record() returned " << mrg::journal::iores_str(res);
- throw jexception(mrg::journal::jerrno::JERR__UNEXPRESPONSE, ss.str().c_str(), "JournalImpl",
+ ss << "read_data_record() returned " << qpid::qls_jrnl::iores_str(res);
+ throw jexception(qpid::qls_jrnl::jerrno::JERR__UNEXPRESPONSE, ss.str().c_str(), "JournalImpl",
"loadMsgContent");
}
}
@@ -336,7 +336,7 @@ JournalImpl::loadMsgContent(u_int64_t rid, std::string& data, size_t length, siz
ss << "read_data_record() was unable to find rid 0x" << std::hex << rid << std::dec;
ss << " (" << rid << "); last rid found was 0x" << std::hex << _dtok.rid() << std::dec;
ss << " (" << _dtok.rid() << ")";
- throw jexception(mrg::journal::jerrno::JERR__RECNFOUND, ss.str().c_str(), "JournalImpl", "loadMsgContent");
+ throw jexception(qpid::qls_jrnl::jerrno::JERR__RECNFOUND, ss.str().c_str(), "JournalImpl", "loadMsgContent");
}
}
@@ -493,13 +493,13 @@ JournalImpl::flush(const bool block_till_aio_cmpl)
}
void
-JournalImpl::log(mrg::journal::log_level ll, const std::string& log_stmt) const
+JournalImpl::log(qpid::qls_jrnl::log_level ll, const std::string& log_stmt) const
{
log(ll, log_stmt.c_str());
}
void
-JournalImpl::log(mrg::journal::log_level ll, const char* const log_stmt) const
+JournalImpl::log(qpid::qls_jrnl::log_level ll, const char* const log_stmt) const
{
switch (ll)
{
@@ -590,9 +590,9 @@ JournalImpl::handleIoResult(const iores r)
writeActivityFlag = true;
switch (r)
{
- case mrg::journal::RHM_IORES_SUCCESS:
+ case qpid::qls_jrnl::RHM_IORES_SUCCESS:
return;
- case mrg::journal::RHM_IORES_ENQCAPTHRESH:
+ case qpid::qls_jrnl::RHM_IORES_ENQCAPTHRESH:
{
std::ostringstream oss;
oss << "Enqueue capacity threshold exceeded on queue \"" << _jid << "\".";
@@ -602,7 +602,7 @@ JournalImpl::handleIoResult(const iores r)
qpid::management::ManagementAgent::SEV_WARN);
THROW_STORE_FULL_EXCEPTION(oss.str());
}
- case mrg::journal::RHM_IORES_FULL:
+ case qpid::qls_jrnl::RHM_IORES_FULL:
{
std::ostringstream oss;
oss << "Journal full on queue \"" << _jid << "\".";
@@ -614,7 +614,7 @@ JournalImpl::handleIoResult(const iores r)
default:
{
std::ostringstream oss;
- oss << "Unexpected I/O response (" << mrg::journal::iores_str(r) << ") on queue " << _jid << "\".";
+ oss << "Unexpected I/O response (" << qpid::qls_jrnl::iores_str(r) << ") on queue " << _jid << "\".";
log(LOG_ERROR, oss.str());
THROW_STORE_FULL_EXCEPTION(oss.str());
}
diff --git a/qpid/cpp/src/qpid/linearstore/JournalImpl.h b/qpid/cpp/src/qpid/linearstore/JournalImpl.h
index 1beb469b3f..c70a044bf5 100644
--- a/qpid/cpp/src/qpid/linearstore/JournalImpl.h
+++ b/qpid/cpp/src/qpid/linearstore/JournalImpl.h
@@ -35,12 +35,13 @@
#include "qpid/management/Manageable.h"
#include "qmf/org/apache/qpid/linearstore/Journal.h"
-namespace qpid { namespace sys {
+namespace qpid {
+namespace sys {
class Timer;
}}
-namespace mrg {
-namespace msgstore {
+namespace qpid{
+namespace linearstore{
class JournalImpl;
@@ -68,7 +69,7 @@ class GetEventsFireEvent : public qpid::sys::TimerTask
inline void cancel() { qpid::sys::Mutex::ScopedLock sl(_gefe_lock); _parent = 0; }
};
-class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal::jcntl, public mrg::journal::aio_callback
+class JournalImpl : public qpid::broker::ExternalQueueStore, public qpid::qls_jrnl::jcntl, public qpid::qls_jrnl::aio_callback
{
public:
typedef boost::function<void (JournalImpl&)> DeleteCallback;
@@ -94,7 +95,7 @@ class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal
void* _xidp;
void* _datap;
size_t _dlen;
- mrg::journal::data_tok _dtok;
+ qpid::qls_jrnl::data_tok _dtok;
bool _external;
qpid::management::ManagementAgent* _agent;
@@ -122,7 +123,7 @@ class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal
const u_int32_t jfsize_sblks,*/
const u_int16_t wcache_num_pages,
const u_int32_t wcache_pgsize_sblks,
- mrg::journal::aio_callback* const cbp);
+ qpid::qls_jrnl::aio_callback* const cbp);
inline void initialize(/*const u_int16_t num_jfiles,
const bool auto_expand,
@@ -140,8 +141,8 @@ class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal
const u_int32_t jfsize_sblks,*/
const u_int16_t wcache_num_pages,
const u_int32_t wcache_pgsize_sblks,
- mrg::journal::aio_callback* const cbp,
- boost::ptr_list<msgstore::PreparedTransaction>* prep_tx_list_ptr,
+ qpid::qls_jrnl::aio_callback* const cbp,
+ boost::ptr_list<PreparedTransaction>* prep_tx_list_ptr,
u_int64_t& highest_rid,
u_int64_t queue_id);
@@ -151,7 +152,7 @@ class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal
const u_int32_t jfsize_sblks,*/
const u_int16_t wcache_num_pages,
const u_int32_t wcache_pgsize_sblks,
- boost::ptr_list<msgstore::PreparedTransaction>* prep_tx_list_ptr,
+ boost::ptr_list<PreparedTransaction>* prep_tx_list_ptr,
u_int64_t& highest_rid,
u_int64_t queue_id) {
recover(/*num_jfiles, auto_expand, ae_max_jfiles, jfsize_sblks,*/ wcache_num_pages, wcache_pgsize_sblks,
@@ -167,42 +168,42 @@ class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal
// Overrides for write inactivity timer
void enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
- const size_t this_data_len, mrg::journal::data_tok* dtokp,
+ const size_t this_data_len, qpid::qls_jrnl::data_tok* dtokp,
const bool transient = false);
- void enqueue_extern_data_record(const size_t tot_data_len, mrg::journal::data_tok* dtokp,
+ void enqueue_extern_data_record(const size_t tot_data_len, qpid::qls_jrnl::data_tok* dtokp,
const bool transient = false);
void enqueue_txn_data_record(const void* const data_buff, const size_t tot_data_len,
- const size_t this_data_len, mrg::journal::data_tok* dtokp, const std::string& xid,
+ const size_t this_data_len, qpid::qls_jrnl::data_tok* dtokp, const std::string& xid,
const bool transient = false);
- void enqueue_extern_txn_data_record(const size_t tot_data_len, mrg::journal::data_tok* dtokp,
+ void enqueue_extern_txn_data_record(const size_t tot_data_len, qpid::qls_jrnl::data_tok* dtokp,
const std::string& xid, const bool transient = false);
- void dequeue_data_record(mrg::journal::data_tok* const dtokp, const bool txn_coml_commit = false);
+ void dequeue_data_record(qpid::qls_jrnl::data_tok* const dtokp, const bool txn_coml_commit = false);
- void dequeue_txn_data_record(mrg::journal::data_tok* const dtokp, const std::string& xid, const bool txn_coml_commit = false);
+ void dequeue_txn_data_record(qpid::qls_jrnl::data_tok* const dtokp, const std::string& xid, const bool txn_coml_commit = false);
- void txn_abort(mrg::journal::data_tok* const dtokp, const std::string& xid);
+ void txn_abort(qpid::qls_jrnl::data_tok* const dtokp, const std::string& xid);
- void txn_commit(mrg::journal::data_tok* const dtokp, const std::string& xid);
+ void txn_commit(qpid::qls_jrnl::data_tok* const dtokp, const std::string& xid);
void stop(bool block_till_aio_cmpl = false);
// Logging
- void log(mrg::journal::log_level level, const std::string& log_stmt) const;
- void log(mrg::journal::log_level level, const char* const log_stmt) const;
+ void log(qpid::qls_jrnl::log_level level, const std::string& log_stmt) const;
+ void log(qpid::qls_jrnl::log_level level, const char* const log_stmt) const;
// Overrides for get_events timer
- mrg::journal::iores flush(const bool block_till_aio_cmpl = false);
+ qpid::qls_jrnl::iores flush(const bool block_till_aio_cmpl = false);
// TimerTask callback
void getEventsFire();
void flushFire();
// AIO callbacks
- virtual void wr_aio_cb(std::vector<mrg::journal::data_tok*>& dtokl);
+ virtual void wr_aio_cb(std::vector<qpid::qls_jrnl::data_tok*>& dtokl);
virtual void rd_aio_cb(std::vector<u_int16_t>& pil);
qpid::management::ManagementObject::shared_ptr GetManagementObject (void) const
@@ -223,7 +224,7 @@ class JournalImpl : public qpid::broker::ExternalQueueStore, public mrg::journal
timer.add(getEventsFireEventsPtr);
getEventsTimerSetFlag = true;
}
- void handleIoResult(const mrg::journal::iores r);
+ void handleIoResult(const qpid::qls_jrnl::iores r);
// Management instrumentation callbacks overridden from jcntl
inline void instr_incr_outstanding_aio_cnt() {
@@ -251,9 +252,9 @@ class TplJournalImpl : public JournalImpl
virtual ~TplJournalImpl() {}
// Special version of read_data_record that ignores transactions - needed when reading the TPL
- inline mrg::journal::iores read_data_record(void** const datapp, std::size_t& dsize,
+ inline qpid::qls_jrnl::iores read_data_record(void** const datapp, std::size_t& dsize,
void** const xidpp, std::size_t& xidsize, bool& transient, bool& external,
- mrg::journal::data_tok* const dtokp) {
+ qpid::qls_jrnl::data_tok* const dtokp) {
return JournalImpl::read_data_record(datapp, dsize, xidpp, xidsize, transient, external, dtokp, true);
}
inline void read_reset() { _rmgr.invalidate(); }
diff --git a/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp b/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp
index c5a1a949c4..a51ca0bf37 100644
--- a/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp
+++ b/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp
@@ -38,8 +38,8 @@
namespace _qmf = qmf::org::apache::qpid::linearstore;
-namespace mrg {
-namespace msgstore {
+namespace qpid{
+namespace linearstore{
const std::string MessageStoreImpl::storeTopLevelDir("rhm"); // Sets the top-level store dir name
@@ -315,7 +315,7 @@ void MessageStoreImpl::init()
}
try {
- journal::jdir::create_dir(getBdbBaseDir());
+ qpid::qls_jrnl::jdir::create_dir(getBdbBaseDir());
dbenv.reset(new DbEnv(0));
dbenv->set_errpfx("msgstore");
@@ -367,7 +367,7 @@ void MessageStoreImpl::init()
THROW_STORE_EXCEPTION_2("BDB exception occurred while initializing store", e);
} catch (const StoreException&) {
throw;
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
QPID_LOG(error, "Journal Exception occurred while initializing store: " << e);
THROW_STORE_EXCEPTION_2("Journal Exception occurred while initializing store", e.what());
} catch (...) {
@@ -416,10 +416,10 @@ void MessageStoreImpl::truncateInit(const bool saveStoreContent)
std::ostringstream oss;
oss << storeDir << "/" << storeTopLevelDir;
if (saveStoreContent) {
- std::string dir = mrg::journal::jdir::push_down(storeDir, storeTopLevelDir, "cluster");
+ std::string dir = qpid::qls_jrnl::jdir::push_down(storeDir, storeTopLevelDir, "cluster");
QPID_LOG(notice, "Store directory " << oss.str() << " was pushed down (saved) into directory " << dir << ".");
} else {
- mrg::journal::jdir::delete_dir(oss.str().c_str());
+ qpid::qls_jrnl::jdir::delete_dir(oss.str().c_str());
QPID_LOG(notice, "Store directory " << oss.str() << " was truncated.");
}
init();
@@ -430,7 +430,7 @@ void MessageStoreImpl::chkTplStoreInit()
// Prevent multiple threads from late-initializing the TPL
qpid::sys::Mutex::ScopedLock sl(tplInitLock);
if (!tplStorePtr->is_ready()) {
- journal::jdir::create_dir(getTplBaseDir());
+ qpid::qls_jrnl::jdir::create_dir(getTplBaseDir());
tplStorePtr->initialize(/*tplNumJrnlFiles, false, 0, tplJrnlFsizeSblks,*/ tplWCacheNumPages, tplWCachePgSizeSblks);
if (mgmtObject.get() != 0) mgmtObject->set_tplIsInitialized(true);
}
@@ -460,7 +460,7 @@ MessageStoreImpl::~MessageStoreImpl()
closeDbs();
} catch (const DbException& e) {
QPID_LOG(error, "Error closing BDB databases: " << e.what());
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
QPID_LOG(error, "Error: " << e.what());
} catch (const std::exception& e) {
QPID_LOG(error, "Error: " << e.what());
@@ -527,7 +527,7 @@ void MessageStoreImpl::create(qpid::broker::PersistableQueue& queue,
try {
// init will create the deque's for the init...
jQueue->initialize(/*localFileCount, localAutoExpandFlag, localAutoExpandMaxFileCount, localFileSizeSblks,*/ wCacheNumPages, wCachePgSizeSblks);
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + queue.getName() + ": create() failed: " + e.what());
}
try {
@@ -833,7 +833,7 @@ void MessageStoreImpl::recoverQueues(TxnCtxt& txn,
recoverMessages(txn, registry, queue, prepared, messages, rcnt, idcnt);
QPID_LOG(info, "Recovered queue \"" << queueName << "\": " << rcnt << " messages recovered; " << idcnt << " messages in-doubt.");
jQueue->recover_complete(); // start journal.
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + queueName + ": recoverQueues() failed: " + e.what());
}
//read all messages: done on a per queue basis if using Journal
@@ -969,12 +969,12 @@ void MessageStoreImpl::recoverMessages(TxnCtxt& /*txn*/,
try {
unsigned aio_sleep_cnt = 0;
while (read) {
- mrg::journal::iores res = jc->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
+ qpid::qls_jrnl::iores res = jc->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
readSize = dtok.dsize();
switch (res)
{
- case mrg::journal::RHM_IORES_SUCCESS: {
+ case qpid::qls_jrnl::RHM_IORES_SUCCESS: {
msg_count++;
qpid::broker::RecoverableMessage::shared_ptr msg;
char* data = (char*)dbuff;
@@ -1024,11 +1024,11 @@ void MessageStoreImpl::recoverMessages(TxnCtxt& /*txn*/,
}
} else {
// Enqueue and/or dequeue tx
- journal::txn_map& tmap = jc->get_txn_map();
- journal::txn_data_list txnList = tmap.get_tdata_list(xid); // txnList will be empty if xid not found
+ qpid::qls_jrnl::txn_map& tmap = jc->get_txn_map();
+ qpid::qls_jrnl::txn_data_list txnList = tmap.get_tdata_list(xid); // txnList will be empty if xid not found
bool enq = false;
bool deq = false;
- for (journal::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
+ for (qpid::qls_jrnl::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
if (j->_enq_flag && j->_rid == rid) enq = true;
else if (!j->_enq_flag && j->_drid == rid) deq = true;
}
@@ -1053,21 +1053,21 @@ void MessageStoreImpl::recoverMessages(TxnCtxt& /*txn*/,
aio_sleep_cnt = 0;
break;
}
- case mrg::journal::RHM_IORES_PAGE_AIOWAIT:
+ case qpid::qls_jrnl::RHM_IORES_PAGE_AIOWAIT:
if (++aio_sleep_cnt > MAX_AIO_SLEEPS)
THROW_STORE_EXCEPTION("Timeout waiting for AIO in MessageStoreImpl::recoverMessages()");
::usleep(AIO_SLEEP_TIME_US);
break;
- case mrg::journal::RHM_IORES_EMPTY:
+ case qpid::qls_jrnl::RHM_IORES_EMPTY:
read = false;
break; // done with all messages. (add call in jrnl to test that _emap is empty.)
default:
std::ostringstream oss;
- oss << "recoverMessages(): Queue: " << queue->getName() << ": Unexpected return from journal read: " << mrg::journal::iores_str(res);
+ oss << "recoverMessages(): Queue: " << queue->getName() << ": Unexpected return from journal read: " << qpid::qls_jrnl::iores_str(res);
THROW_STORE_EXCEPTION(oss.str());
} // switch
} // while
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + queue->getName() + ": recoverMessages() failed: " + e.what());
}
}
@@ -1076,7 +1076,7 @@ qpid::broker::RecoverableMessage::shared_ptr MessageStoreImpl::getExternMessage(
uint64_t /*messageId*/,
unsigned& /*headerSize*/)
{
- throw mrg::journal::jexception(mrg::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "getExternMessage");
+ throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "getExternMessage");
}
int MessageStoreImpl::enqueueMessage(TxnCtxt& txn,
@@ -1113,7 +1113,7 @@ int MessageStoreImpl::enqueueMessage(TxnCtxt& txn,
void MessageStoreImpl::readTplStore()
{
tplRecoverMap.clear();
- journal::txn_map& tmap = tplStorePtr->get_txn_map();
+ qpid::qls_jrnl::txn_map& tmap = tplStorePtr->get_txn_map();
DataTokenImpl dtok;
void* dbuff = NULL; size_t dbuffSize = 0;
void* xidbuff = NULL; size_t xidbuffSize = 0;
@@ -1125,9 +1125,9 @@ void MessageStoreImpl::readTplStore()
while (!done) {
dtok.reset();
dtok.set_wstate(DataTokenImpl::ENQ);
- mrg::journal::iores res = tplStorePtr->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
+ qpid::qls_jrnl::iores res = tplStorePtr->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
switch (res) {
- case mrg::journal::RHM_IORES_SUCCESS: {
+ case qpid::qls_jrnl::RHM_IORES_SUCCESS: {
// Every TPL record contains both data and an XID
assert(dbuffSize>0);
assert(xidbuffSize>0);
@@ -1135,7 +1135,7 @@ void MessageStoreImpl::readTplStore()
bool is2PC = *(static_cast<char*>(dbuff)) != 0;
// Check transaction details; add to recover map
- journal::txn_data_list txnList = tmap.get_tdata_list(xid); // txnList will be empty if xid not found
+ qpid::qls_jrnl::txn_data_list txnList = tmap.get_tdata_list(xid); // txnList will be empty if xid not found
if (!txnList.empty()) { // xid found in tmap
unsigned enqCnt = 0;
unsigned deqCnt = 0;
@@ -1145,7 +1145,7 @@ void MessageStoreImpl::readTplStore()
// Note: will apply to both 1PC and 2PC transactions.
bool commitFlag = true;
- for (journal::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
+ for (qpid::qls_jrnl::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
if (j->_enq_flag) {
rid = j->_rid;
enqCnt++;
@@ -1163,28 +1163,28 @@ void MessageStoreImpl::readTplStore()
aio_sleep_cnt = 0;
break;
}
- case mrg::journal::RHM_IORES_PAGE_AIOWAIT:
+ case qpid::qls_jrnl::RHM_IORES_PAGE_AIOWAIT:
if (++aio_sleep_cnt > MAX_AIO_SLEEPS)
THROW_STORE_EXCEPTION("Timeout waiting for AIO in MessageStoreImpl::recoverTplStore()");
::usleep(AIO_SLEEP_TIME_US);
break;
- case mrg::journal::RHM_IORES_EMPTY:
+ case qpid::qls_jrnl::RHM_IORES_EMPTY:
done = true;
break; // done with all messages. (add call in jrnl to test that _emap is empty.)
default:
std::ostringstream oss;
- oss << "readTplStore(): Unexpected result from journal read: " << mrg::journal::iores_str(res);
+ oss << "readTplStore(): Unexpected result from journal read: " << qpid::qls_jrnl::iores_str(res);
THROW_STORE_EXCEPTION(oss.str());
} // switch
}
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("TPL recoverTplStore() failed: ") + e.what());
}
}
void MessageStoreImpl::recoverTplStore()
{
- if (journal::jdir::exists(tplStorePtr->jrnl_dir() + tplStorePtr->base_filename() + ".jinf")) {
+ if (qpid::qls_jrnl::jdir::exists(tplStorePtr->jrnl_dir() + tplStorePtr->base_filename() + ".jinf")) {
u_int64_t thisHighestRid = 0ULL;
tplStorePtr->recover(/*tplNumJrnlFiles, false, 0, tplJrnlFsizeSblks,*/ tplWCachePgSizeSblks, tplWCacheNumPages, 0, thisHighestRid, 0);
if (highestRid == 0ULL)
@@ -1231,18 +1231,18 @@ void MessageStoreImpl::collectPreparedXids(std::set<std::string>& xids)
void MessageStoreImpl::stage(const boost::intrusive_ptr<qpid::broker::PersistableMessage>& /*msg*/)
{
- throw mrg::journal::jexception(mrg::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "stage");
+ throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "stage");
}
void MessageStoreImpl::destroy(qpid::broker::PersistableMessage& /*msg*/)
{
- throw mrg::journal::jexception(mrg::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "destroy");
+ throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "destroy");
}
void MessageStoreImpl::appendContent(const boost::intrusive_ptr<const qpid::broker::PersistableMessage>& /*msg*/,
const std::string& /*data*/)
{
- throw mrg::journal::jexception(mrg::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "appendContent");
+ throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "appendContent");
}
void MessageStoreImpl::loadContent(const qpid::broker::PersistableQueue& queue,
@@ -1268,7 +1268,7 @@ void MessageStoreImpl::loadContent(const qpid::broker::PersistableQueue& queue,
oss << "Queue " << queue.getName() << ": loadContent() failed: Message " << messageId << " not enqueued";
THROW_STORE_EXCEPTION(oss.str());
}
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + queue.getName() + ": loadContent() failed: " + e.what());
}
} else {
@@ -1287,7 +1287,7 @@ void MessageStoreImpl::flush(const qpid::broker::PersistableQueue& queue)
// TODO: check if this result should be used...
/*mrg::journal::iores res =*/ jc->flush();
}
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + qn + ": flush() failed: " + e.what() );
}
}
@@ -1364,7 +1364,7 @@ void MessageStoreImpl::store(const qpid::broker::PersistableQueue* queue,
} else {
THROW_STORE_EXCEPTION(std::string("MessageStoreImpl::store() failed: queue NULL."));
}
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Queue ") + queue->getName() + ": MessageStoreImpl::store() failed: " +
e.what());
}
@@ -1423,7 +1423,7 @@ void MessageStoreImpl::async_dequeue(qpid::broker::TransactionContext* ctxt,
} else {
jc->dequeue_txn_data_record(ddtokp.get(), tid);
}
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
ddtokp->release();
THROW_STORE_EXCEPTION(std::string("Queue ") + queue.getName() + ": async_dequeue() failed: " + e.what());
}
diff --git a/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h b/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h
index 24e31f1be6..26e4962ead 100644
--- a/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h
+++ b/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h
@@ -47,8 +47,8 @@ namespace qpid { namespace sys {
class Timer;
}}
-namespace mrg {
-namespace msgstore {
+namespace qpid{
+namespace linearstore{
/**
* An implementation of the MessageStore interface based on Berkeley DB
diff --git a/qpid/cpp/src/qpid/linearstore/PreparedTransaction.cpp b/qpid/cpp/src/qpid/linearstore/PreparedTransaction.cpp
index ddf907d1f4..a353a339e3 100644
--- a/qpid/cpp/src/qpid/linearstore/PreparedTransaction.cpp
+++ b/qpid/cpp/src/qpid/linearstore/PreparedTransaction.cpp
@@ -22,7 +22,7 @@
#include "qpid/linearstore/PreparedTransaction.h"
#include <algorithm>
-using namespace mrg::msgstore;
+using namespace qpid::linearstore;
using std::string;
void LockedMappings::add(queue_id queue, message_id message)
diff --git a/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h b/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h
index c5f7b9458a..74b93abfde 100644
--- a/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h
+++ b/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h
@@ -29,8 +29,8 @@
#include <boost/shared_ptr.hpp>
#include <boost/ptr_container/ptr_list.hpp>
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
typedef u_int64_t queue_id;
typedef u_int64_t message_id;
diff --git a/qpid/cpp/src/qpid/linearstore/StoreException.h b/qpid/cpp/src/qpid/linearstore/StoreException.h
index 0f1474f102..9accfd0bd9 100644
--- a/qpid/cpp/src/qpid/linearstore/StoreException.h
+++ b/qpid/cpp/src/qpid/linearstore/StoreException.h
@@ -25,8 +25,8 @@
#include "qpid/linearstore/IdDbt.h"
#include <boost/format.hpp>
-namespace mrg{
-namespace msgstore{
+namespace qpid{
+namespace linearstore{
class StoreException : public std::exception
{
diff --git a/qpid/cpp/src/qpid/linearstore/StorePlugin.cpp b/qpid/cpp/src/qpid/linearstore/StorePlugin.cpp
index eaaaa87f26..98b2275c96 100644
--- a/qpid/cpp/src/qpid/linearstore/StorePlugin.cpp
+++ b/qpid/cpp/src/qpid/linearstore/StorePlugin.cpp
@@ -26,7 +26,7 @@
#include "qpid/log/Statement.h"
#include "qpid/linearstore/MessageStoreImpl.h"
-using mrg::msgstore::MessageStoreImpl;
+using qpid::linearstore::MessageStoreImpl;
namespace qpid {
namespace broker {
diff --git a/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp b/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp
index 5b1fd81275..4084fa992d 100644
--- a/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp
+++ b/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp
@@ -26,8 +26,8 @@
#include "qpid/linearstore/jrnl/jexception.h"
#include "qpid/linearstore/StoreException.h"
-namespace mrg {
-namespace msgstore {
+namespace qpid{
+namespace linearstore{
void TxnCtxt::completeTxn(bool commit) {
sync();
@@ -52,7 +52,7 @@ void TxnCtxt::commitTxn(JournalImpl* jc, bool commit) {
} else {
jc->txn_abort(dtokp.get(), getXid());
}
- } catch (const journal::jexception& e) {
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Error commit") + e.what());
}
}
@@ -104,10 +104,10 @@ void TxnCtxt::sync() {
if (preparedXidStorePtr)
jrnl_flush(preparedXidStorePtr);
for (ipqItr i = impactedQueues.begin(); i != impactedQueues.end(); i++)
- jrnl_sync(static_cast<JournalImpl*>(*i), &journal::jcntl::_aio_cmpl_timeout);
+ jrnl_sync(static_cast<JournalImpl*>(*i), &qpid::qls_jrnl::jcntl::_aio_cmpl_timeout);
if (preparedXidStorePtr)
- jrnl_sync(preparedXidStorePtr, &journal::jcntl::_aio_cmpl_timeout);
- } catch (const journal::jexception& e) {
+ jrnl_sync(preparedXidStorePtr, &qpid::qls_jrnl::jcntl::_aio_cmpl_timeout);
+ } catch (const qpid::qls_jrnl::jexception& e) {
THROW_STORE_EXCEPTION(std::string("Error during txn sync: ") + e.what());
}
}
@@ -122,7 +122,7 @@ void TxnCtxt::jrnl_sync(JournalImpl* jc, timespec* timeout) {
if (!jc || jc->is_txn_synced(getXid()))
return;
while (jc->get_wr_aio_evt_rem()) {
- if (jc->get_wr_events(timeout) == journal::jerrno::AIO_TIMEOUT && timeout)
+ if (jc->get_wr_events(timeout) == qpid::qls_jrnl::jerrno::AIO_TIMEOUT && timeout)
THROW_STORE_EXCEPTION(std::string("Error: timeout waiting for TxnCtxt::jrnl_sync()"));
}
}
diff --git a/qpid/cpp/src/qpid/linearstore/TxnCtxt.h b/qpid/cpp/src/qpid/linearstore/TxnCtxt.h
index 961efa5fe8..f66b9fd74f 100644
--- a/qpid/cpp/src/qpid/linearstore/TxnCtxt.h
+++ b/qpid/cpp/src/qpid/linearstore/TxnCtxt.h
@@ -37,8 +37,8 @@
#include <boost/intrusive_ptr.hpp>
-namespace mrg {
-namespace msgstore {
+namespace qpid{
+namespace linearstore{
class TxnCtxt : public qpid::broker::TransactionContext
{
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/aio.h b/qpid/cpp/src/qpid/linearstore/jrnl/aio.h
index 208a94dbec..7be5b83930 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/aio.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/aio.h
@@ -26,9 +26,9 @@
#include <cstring>
#include <string.h>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
typedef iocb aio_cb;
@@ -135,7 +135,6 @@ public:
}
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_AIO_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/aio_callback.h b/qpid/cpp/src/qpid/linearstore/jrnl/aio_callback.h
index 7c086d6857..975d114f1f 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/aio_callback.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/aio_callback.h
@@ -25,9 +25,9 @@
#include <stdint.h>
#include <vector>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class data_tok;
@@ -40,7 +40,6 @@ namespace journal
virtual void rd_aio_cb(std::vector<uint16_t>& pil) = 0;
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_AIO_CALLBACK_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/cvar.h b/qpid/cpp/src/qpid/linearstore/jrnl/cvar.h
index 68c1e4ad3c..c22dcb8c1c 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/cvar.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/cvar.h
@@ -30,9 +30,9 @@
#include <pthread.h>
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// Ultra-simple thread condition variable class
@@ -71,7 +71,6 @@ namespace journal
}
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_CVAR_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.cpp
index 0f283fd4ea..616dbd6ef5 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.cpp
@@ -27,9 +27,9 @@
#include "qpid/linearstore/jrnl/slock.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// Static members
@@ -179,5 +179,4 @@ data_tok::status_str() const
return oss.str();
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.h b/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.h
index fce6093b0c..bdfa276b0f 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_DATA_TOK_H
#define QPID_LEGACYSTORE_JRNL_DATA_TOK_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class data_tok;
-}
-}
+}}
#include <cassert>
#include <cstddef>
@@ -36,10 +35,9 @@ class data_tok;
#include <pthread.h>
#include <string>
-namespace mrg
+namespace qpid
{
-
-namespace journal
+namespace qls_jrnl
{
/**
@@ -154,7 +152,7 @@ namespace journal
std::string status_str() const;
};
-} // namespace journal
-} // namespace mrg
+} // namespace qls_jrnl
+} // namespace jrnl
#endif // ifndef QPID_LEGACYSTORE_JRNL_DATA_TOK_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp
index 663431657c..ee4bd65853 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp
@@ -43,9 +43,9 @@
#include "qpid/linearstore/jrnl/jexception.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
deq_rec::deq_rec():
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.h b/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.h
index 96415c65df..12ba6af855 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.h
@@ -22,21 +22,20 @@
#ifndef QPID_LEGACYSTORE_JRNL_DEQ_REQ_H
#define QPID_LEGACYSTORE_JRNL_DEQ_REQ_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class deq_rec;
-}
-}
+}}
#include <cstddef>
#include "qpid/linearstore/jrnl/utils/deq_hdr.h"
#include "qpid/linearstore/jrnl/jrec.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.cpp
index 1ee65e6f72..e3ba09d392 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.cpp
@@ -27,9 +27,9 @@
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// static return/error codes
@@ -168,5 +168,4 @@ enq_map::pfid_list(std::vector<uint16_t>& fv)
}
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.h b/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.h
index 603993ce59..cb9c039dfb 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_ENQ_MAP_H
#define QPID_LEGACYSTORE_JRNL_ENQ_MAP_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class enq_map;
-}
-}
+}}
#include "qpid/linearstore/jrnl/jexception.h"
#include "qpid/linearstore/jrnl/smutex.h"
@@ -36,9 +35,9 @@ class enq_map;
#include <pthread.h>
#include <vector>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -110,7 +109,6 @@ namespace journal
void pfid_list(std::vector<uint16_t>& fv);
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_ENQ_MAP_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp
index d9c3896929..8e6fb5cc31 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp
@@ -30,9 +30,9 @@
#include "qpid/linearstore/jrnl/jexception.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// Constructor used for read operations, where buf contains preallocated space to receive data.
@@ -618,5 +618,4 @@ enq_rec::clean()
// clean up allocated memory here
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.h b/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.h
index 0a2ac2ce69..b3502d9ad6 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.h
@@ -22,21 +22,20 @@
#ifndef QPID_LEGACYSTORE_JRNL_ENQ_REC_H
#define QPID_LEGACYSTORE_JRNL_ENQ_REC_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class enq_rec;
-}
-}
+}}
#include <cstddef>
#include "qpid/linearstore/jrnl/utils/enq_hdr.h"
#include "qpid/linearstore/jrnl/jrec.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -100,7 +99,6 @@ namespace journal
virtual void clean();
}; // class enq_rec
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_ENQ_REC_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/enums.h b/qpid/cpp/src/qpid/linearstore/jrnl/enums.h
index bbb42f19f3..fffb8c07d7 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/enums.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/enums.h
@@ -22,9 +22,9 @@
#ifndef QPID_LEGACYSTORE_JRNL_ENUMS_H
#define QPID_LEGACYSTORE_JRNL_ENUMS_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// TODO: Change this to flags, as multiple of these conditions may exist simultaneously
@@ -92,7 +92,6 @@ namespace journal
}
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_ENUMS_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.cpp
index 8ae2cd3dd7..cabb43191a 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.cpp
@@ -36,9 +36,9 @@
#include <sstream>
#include <unistd.h>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
#define AIO_CMPL_TIMEOUT_SEC 5
@@ -984,5 +984,4 @@ jcntl::check_journal_alignment(const uint16_t fid, std::streampos& file_pos, rcv
rd._eo = file_pos;
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.h b/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.h
index 0e59c1e8a0..debcc02efc 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_JCNTL_H
#define QPID_LEGACYSTORE_JRNL_JCNTL_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class jcntl;
-}
-}
+}}
#include <cstddef>
#include <deque>
@@ -42,9 +41,9 @@ namespace journal
#include "qpid/linearstore/jrnl/wmgr.h"
//#include "qpid/linearstore/jrnl/wrfc.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -705,7 +704,6 @@ namespace journal
void check_journal_alignment(const uint16_t fid, std::streampos& rec_offset, rcvdat& rd);
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_JCNTL_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jdir.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/jdir.cpp
index d89b63bea6..a191ed86d9 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jdir.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jdir.cpp
@@ -32,9 +32,9 @@
#include <sys/stat.h>
#include <unistd.h>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
jdir::jdir(const std::string& dirname, const std::string& _base_filename):
@@ -447,5 +447,4 @@ operator<<(std::ostream& os, const jdir* jdirPtr)
return os;
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jdir.h b/qpid/cpp/src/qpid/linearstore/jrnl/jdir.h
index ea294ade83..af4797f44c 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jdir.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jdir.h
@@ -22,21 +22,20 @@
#ifndef QPID_LEGACYSTORE_JRNL_JDIR_H
#define QPID_LEGACYSTORE_JRNL_JDIR_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class jdir;
-}
-}
+}}
//#include "qpid/linearstore/jrnl/jinf.h"
#include <dirent.h>
#include <string>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -362,7 +361,6 @@ namespace journal
static void close_dir(DIR* dir, const std::string& dir_name, const std::string& fn_name);
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_JDIR_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.cpp
index d682f87529..718315a638 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.cpp
@@ -21,9 +21,9 @@
#include "qpid/linearstore/jrnl/jerrno.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
std::map<uint32_t, const char*> jerrno::_err_map;
@@ -236,5 +236,4 @@ jerrno::err_msg(const uint32_t err_no) throw ()
return _err_map_itr->second;
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.h b/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.h
index 3d43c986b7..19b9954c93 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.h
@@ -22,21 +22,20 @@
#ifndef QPID_LEGACYSTORE_JRNL_JERRNO_H
#define QPID_LEGACYSTORE_JRNL_JERRNO_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class jerrno;
-}
-}
+}}
#include <map>
#include <stdint.h>
#include <string>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -156,7 +155,6 @@ namespace journal
static bool __init();
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_JERRNO_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jexception.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/jexception.cpp
index 69d59c6d13..38ef85ddb8 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jexception.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jexception.cpp
@@ -27,9 +27,9 @@
#define CATLEN(p) MAX_MSG_SIZE - std::strlen(p) - 1
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
jexception::jexception() throw ():
@@ -168,5 +168,4 @@ operator<<(std::ostream& os, const jexception* jePtr)
return os;
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jexception.h b/qpid/cpp/src/qpid/linearstore/jrnl/jexception.h
index 4716638008..a3a34691df 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jexception.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jexception.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_JEXCEPTION_H
#define QPID_LEGACYSTORE_JRNL_JEXCEPTION_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class jexception;
-}
-}
+}}
#include <cerrno>
#include <cstdio>
@@ -71,9 +70,9 @@ class jexception;
::abort(); \
}
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
* \class jexception
@@ -122,7 +121,6 @@ namespace journal
friend std::ostream& operator<<(std::ostream& os, const jexception* jePtr);
}; // class jexception
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_JEXCEPTION_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jrec.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/jrec.cpp
index a4d88cc980..87e0b0c04c 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jrec.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jrec.cpp
@@ -26,9 +26,9 @@
#include "qpid/linearstore/jrnl/jexception.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
jrec::jrec() {}
@@ -104,5 +104,4 @@ jrec::chk_tail(const rec_tail_t& tail, const rec_hdr_t& hdr)
}
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/jrec.h b/qpid/cpp/src/qpid/linearstore/jrnl/jrec.h
index 42587943e8..e1253ce9c4 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/jrec.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/jrec.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_JREC_H
#define QPID_LEGACYSTORE_JRNL_JREC_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class jrec;
-}
-}
+}}
#include <cstddef>
#include <fstream>
@@ -37,9 +36,9 @@ class jrec;
#include "qpid/linearstore/jrnl/utils/rec_tail.h"
#include <string>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -166,7 +165,6 @@ namespace journal
virtual void clean() = 0;
}; // class jrec
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_JREC_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.cpp
index e3bd8b2bda..7f9d0aed98 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.cpp
@@ -30,9 +30,9 @@
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
pmgr::page_cb::page_cb(uint16_t index):
@@ -200,5 +200,4 @@ pmgr::page_state_str(page_state ps)
return "<page_state unknown>";
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.h b/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.h
index 17c501d7d0..ebd3ddf181 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.h
@@ -22,14 +22,13 @@
#ifndef QPID_LEGACYSTORE_JRNL_PMGR_H
#define QPID_LEGACYSTORE_JRNL_PMGR_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class pmgr;
class jcntl;
-}
-}
+}}
#include <deque>
#include "qpid/linearstore/jrnl/aio.h"
@@ -42,9 +41,9 @@ namespace journal
#include "qpid/linearstore/jrnl/txn_map.h"
#include "qpid/linearstore/jrnl/txn_rec.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -125,7 +124,6 @@ namespace journal
virtual void clean();
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_PMGR_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/rcvdat.h b/qpid/cpp/src/qpid/linearstore/jrnl/rcvdat.h
index c74d7f1a83..57c80b13b4 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/rcvdat.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/rcvdat.h
@@ -30,9 +30,9 @@
#include <stdint.h>
#include <vector>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
struct rcvdat
@@ -165,7 +165,6 @@ namespace journal
return oss.str();
}
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_RCVDAT_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.cpp
index 41201fe64e..f49066c38d 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.cpp
@@ -28,9 +28,9 @@
#include "qpid/linearstore/jrnl/jerrno.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
rmgr::rmgr(jcntl* jc, enq_map& emap, txn_map& tmap/*, rrfc& rrfc*/):
@@ -702,5 +702,4 @@ rmgr::discard(data_tok* dtokp)
}
*/
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.h b/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.h
index 2b7c948868..d7d38624fa 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/rmgr.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_RMGR_H
#define QPID_LEGACYSTORE_JRNL_RMGR_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class rmgr;
-}
-}
+}}
#include <cstring>
#include "qpid/linearstore/jrnl/enums.h"
@@ -38,9 +37,9 @@ class rmgr;
//#include "qpid/linearstore/jrnl/rrfc.h"
#include "qpid/linearstore/jrnl/utils/file_hdr.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -98,7 +97,6 @@ namespace journal
void init_file_header_read();
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_RMGR_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/slock.h b/qpid/cpp/src/qpid/linearstore/jrnl/slock.h
index 56aa74f312..bbfee37353 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/slock.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/slock.h
@@ -26,9 +26,9 @@
#include "qpid/linearstore/jrnl/smutex.h"
#include <pthread.h>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// Ultra-simple scoped lock class, auto-releases mutex when it goes out-of-scope
@@ -68,7 +68,6 @@ namespace journal
inline bool locked() const { return _locked; }
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_SLOCK_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/smutex.h b/qpid/cpp/src/qpid/linearstore/jrnl/smutex.h
index 70a5fc9969..087e19730b 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/smutex.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/smutex.h
@@ -25,9 +25,9 @@
#include "qpid/linearstore/jrnl/jexception.h"
#include <pthread.h>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// Ultra-simple scoped mutex class that allows a posix mutex to be initialized and destroyed with error checks
@@ -47,7 +47,6 @@ namespace journal
inline pthread_mutex_t* get() const { return &_m; }
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_SMUTEX_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.cpp
index e5051c0b13..49e9a61704 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.cpp
@@ -23,9 +23,9 @@
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
const std::string
@@ -40,5 +40,4 @@ time_ns::str(int precision) const
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.h b/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.h
index 7e4f46b3ce..3319573001 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.h
@@ -26,9 +26,9 @@
#include <ctime>
#include <string>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
struct time_ns : public timespec
@@ -88,7 +88,6 @@ struct time_ns : public timespec
{ if(tv_sec == rhs.tv_sec) return tv_nsec <= rhs.tv_nsec; return tv_sec <= rhs.tv_sec; }
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_TIME_NS_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.cpp
index 6be90b67fa..721bb3a966 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.cpp
@@ -27,9 +27,9 @@
#include "qpid/linearstore/jrnl/slock.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
// return/error codes
@@ -241,5 +241,4 @@ txn_map::xid_list(std::vector<std::string>& xv)
}
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.h b/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.h
index 0ae322e80c..0cbafd66b0 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_TXN_MAP_H
#define QPID_LEGACYSTORE_JRNL_TXN_MAP_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class txn_map;
-}
-}
+}}
#include "qpid/linearstore/jrnl/smutex.h"
#include <map>
@@ -36,9 +35,9 @@ namespace journal
#include <string>
#include <vector>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -141,7 +140,6 @@ namespace journal
const txn_data_list get_tdata_list_nolock(const std::string& xid);
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_TXN_MAP_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp
index 67889cf6e7..886877976b 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp
@@ -30,9 +30,9 @@
#include "qpid/linearstore/jrnl/jexception.h"
#include <sstream>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
txn_rec::txn_rec():
@@ -437,5 +437,4 @@ txn_rec::clean()
// clean up allocated memory here
}
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.h b/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.h
index 68c759eaa9..4e9700e392 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.h
@@ -22,21 +22,20 @@
#ifndef QPID_LEGACYSTORE_JRNL_TXN_REC_H
#define QPID_LEGACYSTORE_JRNL_TXN_REC_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class txn_rec;
-}
-}
+}}
#include <cstddef>
#include "qpid/linearstore/jrnl/jrec.h"
#include "qpid/linearstore/jrnl/utils/txn_hdr.h"
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -84,7 +83,6 @@ namespace journal
virtual void clean();
}; // class txn_rec
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_TXN_REC_H
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.h b/qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.h
index f84848a6ad..25cfc71efb 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.h
@@ -24,6 +24,10 @@
#include <stdbool.h>
#include "rec_hdr.h"
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#pragma pack(1)
/**
@@ -70,4 +74,8 @@ void set_txn_coml_commit(deq_hdr_t *dh, const bool commit);
#pragma pack()
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ifndef QPID_LINEARSTORE_JRNL_UTILS_DEQ_HDR_H */
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.h b/qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.h
index 5cfb6150cf..e194dafb9a 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.h
@@ -24,6 +24,10 @@
#include <stdbool.h>
#include "rec_hdr.h"
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#pragma pack(1)
/**
@@ -69,4 +73,8 @@ void set_enq_external(enq_hdr_t *eh, const bool external);
#pragma pack()
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ifndef QPID_LINEARSTORE_JRNL_UTILS_ENQ_HDR_H */
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.h b/qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.h
index 5076a184b1..304abf0700 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.h
@@ -24,6 +24,10 @@
#include <time.h>
#include "rec_hdr.h"
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#pragma pack(1)
/**
@@ -87,4 +91,8 @@ void set_time(file_hdr_t *fh, struct timespec *ts);
#pragma pack()
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ifndef QPID_LINEARSTORE_JRNL_UTILS_FILE_HDR_H */
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.h b/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.h
index 0a38b191d1..c843e21316 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.h
@@ -23,6 +23,10 @@
#include <stdint.h>
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#pragma pack(1)
/**
@@ -56,4 +60,8 @@ void rec_hdr_copy(rec_hdr_t* dest, const rec_hdr_t* src);
#pragma pack()
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ifndef QPID_LINEARSTORE_JRNL_UTILS_REC_HDR_H */
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.h b/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.h
index d865f17c6c..9fbd186ea0 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.h
@@ -24,6 +24,10 @@
#include <stdint.h>
#include "rec_hdr.h"
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#pragma pack(1)
/**
@@ -60,4 +64,8 @@ void rec_tail_copy(rec_tail_t* dest, const rec_hdr_t* src, const uint32_t checks
#pragma pack()
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ifnedf QPID_LEGACYSTORE_JRNL_UTILS_REC_TAIL_H */
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.h b/qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.h
index 9312a2911b..02c00e09b3 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.h
@@ -23,6 +23,10 @@
#include "rec_hdr.h"
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#pragma pack(1)
/**
@@ -59,4 +63,8 @@ void txn_hdr_copy(txn_hdr_t* dest, const txn_hdr_t* src);
#pragma pack()
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ifndef QPID_LINEARSTORE_JRNL_UTILS_TXN_HDR_H */
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.cpp
index 54d20edb5c..8ea129a945 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.cpp
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.cpp
@@ -31,9 +31,9 @@
#include <sstream>
#include <stdint.h>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
wmgr::wmgr(jcntl* jc, enq_map& emap, txn_map& tmap/*, wrfc& wrfc*/):
@@ -1065,5 +1065,4 @@ wmgr::status_str() const
const char* wmgr::_op_str[] = {"enqueue", "dequeue", "abort", "commit"};
-} // namespace journal
-} // namespace mrg
+}}
diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.h b/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.h
index 7d29ac675f..68de2db58f 100644
--- a/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.h
+++ b/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.h
@@ -22,13 +22,12 @@
#ifndef QPID_LEGACYSTORE_JRNL_WMGR_H
#define QPID_LEGACYSTORE_JRNL_WMGR_H
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
class wmgr;
-}
-}
+}}
#include <cstring>
#include "qpid/linearstore/jrnl/enums.h"
@@ -36,9 +35,9 @@ class wmgr;
//#include "qpid/linearstore/jrnl/wrfc.h"
#include <set>
-namespace mrg
+namespace qpid
{
-namespace journal
+namespace qls_jrnl
{
/**
@@ -130,7 +129,6 @@ namespace journal
void clean();
};
-} // namespace journal
-} // namespace mrg
+}}
#endif // ifndef QPID_LEGACYSTORE_JRNL_WMGR_H