rhmessaging commits: r4530 - store/trunk/cpp/lib.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2013-01-10 13:49:24 -0500 (Thu, 10 Jan 2013)
New Revision: 4530
Modified:
store/trunk/cpp/lib/StorePlugin.cpp
Log:
Fixed a compile problem which resulted from broker checkin r.1424125 which removed broker method isInCluster().
Modified: store/trunk/cpp/lib/StorePlugin.cpp
===================================================================
--- store/trunk/cpp/lib/StorePlugin.cpp 2013-01-10 07:00:50 UTC (rev 4529)
+++ store/trunk/cpp/lib/StorePlugin.cpp 2013-01-10 18:49:24 UTC (rev 4530)
@@ -67,12 +67,8 @@
if (!broker) return;
if (!store) return;
// Not done in earlyInitialize as the Broker::isInCluster test won't work there.
- if (broker->isInCluster()) {
- QPID_LOG(info, "Disabling management instrumentation for the store in a cluster.");
- } else {
- QPID_LOG(info, "Enabling management instrumentation for the store.");
- store->initManagement();
- }
+ QPID_LOG(info, "Enabling management instrumentation for the store.");
+ store->initManagement();
}
void finalize()
11 years, 11 months
rhmessaging commits: r4527 - in store/branches/qpid-0.18: lib/gen/qmf/com/redhat/rhm/store and 2 other directories.
by rhmessaging-commits@lists.jboss.org
Author: mcressman
Date: 2013-01-02 15:15:03 -0500 (Wed, 02 Jan 2013)
New Revision: 4527
Modified:
store/branches/qpid-0.18/lib/JournalImpl.cpp
store/branches/qpid-0.18/lib/JournalImpl.h
store/branches/qpid-0.18/lib/Makefile.am
store/branches/qpid-0.18/lib/MessageStoreImpl.cpp
store/branches/qpid-0.18/lib/MessageStoreImpl.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Package.h
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.cpp
store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.h
store/branches/qpid-0.18/lib/jrnl/deq_rec.cpp
store/branches/qpid-0.18/lib/jrnl/enq_rec.cpp
store/branches/qpid-0.18/lib/jrnl/jcntl.cpp
store/branches/qpid-0.18/lib/jrnl/txn_rec.cpp
store/branches/qpid-0.18/lib/jrnl/wmgr.cpp
store/branches/qpid-0.18/tests/Makefile.am
Log:
Update 0.18 store branch with 0.18-specific changes that
have been applied to the MRG 2.3 builds so far.
Modified: store/branches/qpid-0.18/lib/JournalImpl.cpp
===================================================================
--- store/branches/qpid-0.18/lib/JournalImpl.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/JournalImpl.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -70,7 +70,6 @@
_dlen(0),
_dtok(),
_external(false),
- _mgmtObject(0),
deleteCallback(onDelete)
{
getEventsFireEventsPtr = new GetEventsFireEvent(this, getEventsTimeout);
@@ -99,9 +98,9 @@
inactivityFireEventPtr->cancel();
free_read_buffers();
- if (_mgmtObject != 0) {
+ if (_mgmtObject.get() != 0) {
_mgmtObject->resourceDestroy();
- _mgmtObject = 0;
+ _mgmtObject.reset();
}
log(LOG_NOTICE, "Destroyed");
@@ -113,8 +112,7 @@
_agent = a;
if (_agent != 0)
{
- _mgmtObject = new _qmf::Journal
- (_agent, (qpid::management::Manageable*) this);
+ _mgmtObject = _qmf::Journal::shared_ptr(new _qmf::Journal(_agent, (qpid::management::Manageable*) this));
_mgmtObject->set_name(_jid);
_mgmtObject->set_directory(_jdir.dirname());
@@ -151,7 +149,7 @@
jcntl::initialize(num_jfiles, auto_expand, ae_max_jfiles, jfsize_sblks, wcache_num_pages, wcache_pgsize_sblks, cbp);
log(LOG_DEBUG, "Initialization complete");
- if (_mgmtObject != 0)
+ if (_mgmtObject)
{
_mgmtObject->set_initialFileCount(_lpmgr.num_jfiles());
_mgmtObject->set_autoExpand(_lpmgr.is_ae());
@@ -185,7 +183,7 @@
oss1 << " wcache_num_pages=" << wcache_num_pages;
log(LOG_DEBUG, oss1.str());
- if (_mgmtObject != 0)
+ if (_mgmtObject)
{
_mgmtObject->set_initialFileCount(_lpmgr.num_jfiles());
_mgmtObject->set_autoExpand(_lpmgr.is_ae());
@@ -230,7 +228,7 @@
oss2 << "; journal now read-only.";
log(LOG_DEBUG, oss2.str());
- if (_mgmtObject != 0)
+ if (_mgmtObject)
{
_mgmtObject->inc_recordDepth(_emap.size());
_mgmtObject->inc_enqueues(_emap.size());
@@ -351,7 +349,7 @@
{
handleIoResult(jcntl::enqueue_data_record(data_buff, tot_data_len, this_data_len, dtokp, transient));
- if (_mgmtObject != 0)
+ if (_mgmtObject)
{
_mgmtObject->inc_enqueues();
_mgmtObject->inc_recordDepth();
@@ -364,7 +362,7 @@
{
handleIoResult(jcntl::enqueue_extern_data_record(tot_data_len, dtokp, transient));
- if (_mgmtObject != 0)
+ if (_mgmtObject)
{
_mgmtObject->inc_enqueues();
_mgmtObject->inc_recordDepth();
@@ -375,11 +373,11 @@
JournalImpl::enqueue_txn_data_record(const void* const data_buff, const size_t tot_data_len,
const size_t this_data_len, data_tok* dtokp, const std::string& xid, const bool transient)
{
- bool txn_incr = _mgmtObject != 0 ? _tmap.in_map(xid) : false;
+ bool txn_incr = _mgmtObject.get() != 0 ? _tmap.in_map(xid) : false;
handleIoResult(jcntl::enqueue_txn_data_record(data_buff, tot_data_len, this_data_len, dtokp, xid, transient));
- if (_mgmtObject != 0)
+ if (_mgmtObject.get() != 0)
{
if (!txn_incr) // If this xid was not in _tmap, it will be now...
_mgmtObject->inc_txn();
@@ -393,11 +391,11 @@
JournalImpl::enqueue_extern_txn_data_record(const size_t tot_data_len, data_tok* dtokp,
const std::string& xid, const bool transient)
{
- bool txn_incr = _mgmtObject != 0 ? _tmap.in_map(xid) : false;
+ bool txn_incr = _mgmtObject.get() != 0 ? _tmap.in_map(xid) : false;
handleIoResult(jcntl::enqueue_extern_txn_data_record(tot_data_len, dtokp, xid, transient));
- if (_mgmtObject != 0)
+ if (_mgmtObject.get() != 0)
{
if (!txn_incr) // If this xid was not in _tmap, it will be now...
_mgmtObject->inc_txn();
@@ -412,7 +410,7 @@
{
handleIoResult(jcntl::dequeue_data_record(dtokp, txn_coml_commit));
- if (_mgmtObject != 0)
+ if (_mgmtObject.get() != 0)
{
_mgmtObject->inc_dequeues();
_mgmtObject->inc_txnDequeues();
@@ -423,11 +421,11 @@
void
JournalImpl::dequeue_txn_data_record(data_tok* const dtokp, const std::string& xid, const bool txn_coml_commit)
{
- bool txn_incr = _mgmtObject != 0 ? _tmap.in_map(xid) : false;
+ bool txn_incr = _mgmtObject.get() != 0 ? _tmap.in_map(xid) : false;
handleIoResult(jcntl::dequeue_txn_data_record(dtokp, xid, txn_coml_commit));
- if (_mgmtObject != 0)
+ if (_mgmtObject.get() != 0)
{
if (!txn_incr) // If this xid was not in _tmap, it will be now...
_mgmtObject->inc_txn();
@@ -442,7 +440,7 @@
{
handleIoResult(jcntl::txn_abort(dtokp, xid));
- if (_mgmtObject != 0)
+ if (_mgmtObject.get() != 0)
{
_mgmtObject->dec_txn();
_mgmtObject->inc_txnAborts();
@@ -454,7 +452,7 @@
{
handleIoResult(jcntl::txn_commit(dtokp, xid));
- if (_mgmtObject != 0)
+ if (_mgmtObject.get() != 0)
{
_mgmtObject->dec_txn();
_mgmtObject->inc_txnCommits();
@@ -469,9 +467,9 @@
ifep->cancel();
jcntl::stop(block_till_aio_cmpl);
- if (_mgmtObject != 0) {
+ if (_mgmtObject.get() != 0) {
_mgmtObject->resourceDestroy();
- _mgmtObject = 0;
+ _mgmtObject.reset();
}
}
Modified: store/branches/qpid-0.18/lib/JournalImpl.h
===================================================================
--- store/branches/qpid-0.18/lib/JournalImpl.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/JournalImpl.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -100,7 +100,7 @@
bool _external;
qpid::management::ManagementAgent* _agent;
- qmf::com::redhat::rhm::store::Journal* _mgmtObject;
+ qmf::com::redhat::rhm::store::Journal::shared_ptr _mgmtObject;
DeleteCallback deleteCallback;
public:
@@ -207,7 +207,7 @@
virtual void wr_aio_cb(std::vector<mrg::journal::data_tok*>& dtokl);
virtual void rd_aio_cb(std::vector<u_int16_t>& pil);
- qpid::management::ManagementObject* GetManagementObject (void) const
+ qpid::management::ManagementObject::shared_ptr GetManagementObject (void) const
{ return _mgmtObject; }
qpid::management::Manageable::status_t ManagementMethod (uint32_t,
Modified: store/branches/qpid-0.18/lib/Makefile.am
===================================================================
--- store/branches/qpid-0.18/lib/Makefile.am 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/Makefile.am 2013-01-02 20:15:03 UTC (rev 4527)
@@ -19,7 +19,7 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
-AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS) $(QPID_CXXFLAGS) -I$(srcdir)/gen -DRHM_CLEAN -pthread
+AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS) $(QPID_CXXFLAGS) -I$(srcdir)/gen -DRHM_CLEAN -pthread -D_IN_QPID_BROKER
#SUBDIRS = jrnl2
Modified: store/branches/qpid-0.18/lib/MessageStoreImpl.cpp
===================================================================
--- store/branches/qpid-0.18/lib/MessageStoreImpl.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/MessageStoreImpl.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -75,7 +75,6 @@
isInit(false),
envPath(envpath),
timer(timer_),
- mgmtObject(0),
agent(0)
{}
@@ -226,7 +225,7 @@
agent = broker->getManagementAgent();
if (agent != 0) {
_qmf::Package packageInitializer(agent);
- mgmtObject = new _qmf::Store(agent, this, broker);
+ mgmtObject = _qmf::Store::shared_ptr(new _qmf::Store(agent, this, broker));
mgmtObject->set_location(storeDir);
mgmtObject->set_defaultInitialFileCount(numJrnlFiles);
@@ -403,9 +402,9 @@
}
}
- if (mgmtObject != 0) {
+ if (mgmtObject.get() != 0) {
mgmtObject->resourceDestroy();
- mgmtObject = 0;
+ mgmtObject.reset();
}
}
@@ -445,7 +444,7 @@
if (!tplStorePtr->is_ready()) {
journal::jdir::create_dir(getTplBaseDir());
tplStorePtr->initialize(tplNumJrnlFiles, false, 0, tplJrnlFsizeSblks, tplWCacheNumPages, tplWCachePgSizeSblks);
- if (mgmtObject != 0) mgmtObject->set_tplIsInitialized(true);
+ if (mgmtObject.get() != 0) mgmtObject->set_tplIsInitialized(true);
}
}
@@ -481,9 +480,9 @@
QPID_LOG(error, "Unknown error in MessageStoreImpl::~MessageStoreImpl()");
}
- if (mgmtObject != 0) {
+ if (mgmtObject.get() != 0) {
mgmtObject->resourceDestroy();
- mgmtObject = 0;
+ mgmtObject.reset();
}
}
@@ -708,7 +707,7 @@
//recover transactions:
for (txn_list::iterator i = prepared.begin(); i != prepared.end(); i++) {
const PreparedTransaction pt = *i;
- if (mgmtObject != 0) {
+ if (mgmtObject.get() != 0) {
mgmtObject->inc_tplTransactionDepth();
mgmtObject->inc_tplTxnPrepares();
}
@@ -1443,7 +1442,7 @@
tplStorePtr->dequeue_txn_data_record(txn.getDtok(), txn.getXid(), commit);
}
txn.complete(commit);
- if (mgmtObject != 0) {
+ if (mgmtObject.get() != 0) {
mgmtObject->dec_tplTransactionDepth();
if (commit)
mgmtObject->inc_tplTxnCommits();
@@ -1497,7 +1496,7 @@
ctxt->prepare(tplStorePtr.get());
// make sure all the data is written to disk before returning
ctxt->sync();
- if (mgmtObject != 0) {
+ if (mgmtObject.get() != 0) {
mgmtObject->inc_tplTransactionDepth();
mgmtObject->inc_tplTxnPrepares();
}
Modified: store/branches/qpid-0.18/lib/MessageStoreImpl.h
===================================================================
--- store/branches/qpid-0.18/lib/MessageStoreImpl.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/MessageStoreImpl.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -154,7 +154,7 @@
const char* envPath;
qpid::sys::Timer& timer;
- qmf::com::redhat::rhm::store::Store* mgmtObject;
+ qmf::com::redhat::rhm::store::Store::shared_ptr mgmtObject;
qpid::management::ManagementAgent* agent;
@@ -363,7 +363,7 @@
void abort(qpid::broker::TransactionContext& ctxt);
- qpid::management::ManagementObject* GetManagementObject (void) const
+ qpid::management::ManagementObject::shared_ptr GetManagementObject (void) const
{ return mgmtObject; }
inline qpid::management::Manageable::status_t ManagementMethod (u_int32_t, qpid::management::Args&)
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -128,3 +128,8 @@
map["numFiles"] = ::qpid::types::Variant(numFiles);
}
+
+bool EventCreated::match(const std::string& evt, const std::string& pkg)
+{
+ return eventName == evt && packageName == pkg;
+}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -25,6 +25,7 @@
// Please do not edit.
#include "qpid/management/ManagementEvent.h"
+#include "qmf/BrokerImportExport.h"
namespace qmf {
namespace com {
@@ -33,13 +34,13 @@
namespace store {
-class EventCreated : public ::qpid::management::ManagementEvent
+QPID_BROKER_CLASS_EXTERN class EventCreated : public ::qpid::management::ManagementEvent
{
private:
static void writeSchema (std::string& schema);
- static std::string packageName;
- static std::string eventName;
static uint8_t md5Sum[MD5_LEN];
+ QPID_BROKER_EXTERN static std::string packageName;
+ QPID_BROKER_EXTERN static std::string eventName;
const std::string& jrnlId;
const uint32_t fileSize;
@@ -49,18 +50,23 @@
public:
writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
- EventCreated(const std::string& _jrnlId,
+ QPID_BROKER_EXTERN EventCreated(const std::string& _jrnlId,
const uint32_t _fileSize,
const uint16_t _numFiles);
- ~EventCreated() {};
+ QPID_BROKER_EXTERN ~EventCreated() {};
static void registerSelf(::qpid::management::ManagementAgent* agent);
std::string& getPackageName() const { return packageName; }
std::string& getEventName() const { return eventName; }
uint8_t* getMd5Sum() const { return md5Sum; }
uint8_t getSeverity() const { return 5; }
- void encode(std::string& buffer) const;
- void mapEncode(::qpid::types::Variant::Map& map) const;
+ QPID_BROKER_EXTERN void encode(std::string& buffer) const;
+ QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const;
+
+ QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg);
+ static std::pair<std::string,std::string> getFullName() {
+ return std::make_pair(packageName, eventName);
+ }
};
}}}}}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -118,3 +118,8 @@
map["what"] = ::qpid::types::Variant(what);
}
+
+bool EventEnqThresholdExceeded::match(const std::string& evt, const std::string& pkg)
+{
+ return eventName == evt && packageName == pkg;
+}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -25,6 +25,7 @@
// Please do not edit.
#include "qpid/management/ManagementEvent.h"
+#include "qmf/BrokerImportExport.h"
namespace qmf {
namespace com {
@@ -33,13 +34,13 @@
namespace store {
-class EventEnqThresholdExceeded : public ::qpid::management::ManagementEvent
+QPID_BROKER_CLASS_EXTERN class EventEnqThresholdExceeded : public ::qpid::management::ManagementEvent
{
private:
static void writeSchema (std::string& schema);
- static std::string packageName;
- static std::string eventName;
static uint8_t md5Sum[MD5_LEN];
+ QPID_BROKER_EXTERN static std::string packageName;
+ QPID_BROKER_EXTERN static std::string eventName;
const std::string& jrnlId;
const std::string& what;
@@ -48,17 +49,22 @@
public:
writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
- EventEnqThresholdExceeded(const std::string& _jrnlId,
+ QPID_BROKER_EXTERN EventEnqThresholdExceeded(const std::string& _jrnlId,
const std::string& _what);
- ~EventEnqThresholdExceeded() {};
+ QPID_BROKER_EXTERN ~EventEnqThresholdExceeded() {};
static void registerSelf(::qpid::management::ManagementAgent* agent);
std::string& getPackageName() const { return packageName; }
std::string& getEventName() const { return eventName; }
uint8_t* getMd5Sum() const { return md5Sum; }
uint8_t getSeverity() const { return 4; }
- void encode(std::string& buffer) const;
- void mapEncode(::qpid::types::Variant::Map& map) const;
+ QPID_BROKER_EXTERN void encode(std::string& buffer) const;
+ QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const;
+
+ QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg);
+ static std::pair<std::string,std::string> getFullName() {
+ return std::make_pair(packageName, eventName);
+ }
};
}}}}}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -118,3 +118,8 @@
map["what"] = ::qpid::types::Variant(what);
}
+
+bool EventFull::match(const std::string& evt, const std::string& pkg)
+{
+ return eventName == evt && packageName == pkg;
+}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventFull.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -25,6 +25,7 @@
// Please do not edit.
#include "qpid/management/ManagementEvent.h"
+#include "qmf/BrokerImportExport.h"
namespace qmf {
namespace com {
@@ -33,13 +34,13 @@
namespace store {
-class EventFull : public ::qpid::management::ManagementEvent
+QPID_BROKER_CLASS_EXTERN class EventFull : public ::qpid::management::ManagementEvent
{
private:
static void writeSchema (std::string& schema);
- static std::string packageName;
- static std::string eventName;
static uint8_t md5Sum[MD5_LEN];
+ QPID_BROKER_EXTERN static std::string packageName;
+ QPID_BROKER_EXTERN static std::string eventName;
const std::string& jrnlId;
const std::string& what;
@@ -48,17 +49,22 @@
public:
writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
- EventFull(const std::string& _jrnlId,
+ QPID_BROKER_EXTERN EventFull(const std::string& _jrnlId,
const std::string& _what);
- ~EventFull() {};
+ QPID_BROKER_EXTERN ~EventFull() {};
static void registerSelf(::qpid::management::ManagementAgent* agent);
std::string& getPackageName() const { return packageName; }
std::string& getEventName() const { return eventName; }
uint8_t* getMd5Sum() const { return md5Sum; }
uint8_t getSeverity() const { return 3; }
- void encode(std::string& buffer) const;
- void mapEncode(::qpid::types::Variant::Map& map) const;
+ QPID_BROKER_EXTERN void encode(std::string& buffer) const;
+ QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const;
+
+ QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg);
+ static std::pair<std::string,std::string> getFullName() {
+ return std::make_pair(packageName, eventName);
+ }
};
}}}}}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -168,3 +168,8 @@
map["numTxnDeq"] = ::qpid::types::Variant(numTxnDeq);
}
+
+bool EventRecovered::match(const std::string& evt, const std::string& pkg)
+{
+ return eventName == evt && packageName == pkg;
+}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -25,6 +25,7 @@
// Please do not edit.
#include "qpid/management/ManagementEvent.h"
+#include "qmf/BrokerImportExport.h"
namespace qmf {
namespace com {
@@ -33,13 +34,13 @@
namespace store {
-class EventRecovered : public ::qpid::management::ManagementEvent
+QPID_BROKER_CLASS_EXTERN class EventRecovered : public ::qpid::management::ManagementEvent
{
private:
static void writeSchema (std::string& schema);
- static std::string packageName;
- static std::string eventName;
static uint8_t md5Sum[MD5_LEN];
+ QPID_BROKER_EXTERN static std::string packageName;
+ QPID_BROKER_EXTERN static std::string eventName;
const std::string& jrnlId;
const uint32_t fileSize;
@@ -53,22 +54,27 @@
public:
writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
- EventRecovered(const std::string& _jrnlId,
+ QPID_BROKER_EXTERN EventRecovered(const std::string& _jrnlId,
const uint32_t _fileSize,
const uint16_t _numFiles,
const uint32_t _numEnq,
const uint32_t _numTxn,
const uint32_t _numTxnEnq,
const uint32_t _numTxnDeq);
- ~EventRecovered() {};
+ QPID_BROKER_EXTERN ~EventRecovered() {};
static void registerSelf(::qpid::management::ManagementAgent* agent);
std::string& getPackageName() const { return packageName; }
std::string& getEventName() const { return eventName; }
uint8_t* getMd5Sum() const { return md5Sum; }
uint8_t getSeverity() const { return 5; }
- void encode(std::string& buffer) const;
- void mapEncode(::qpid::types::Variant::Map& map) const;
+ QPID_BROKER_EXTERN void encode(std::string& buffer) const;
+ QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const;
+
+ QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg);
+ static std::pair<std::string,std::string> getFullName() {
+ return std::make_pair(packageName, eventName);
+ }
};
}}}}}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -7,9 +7,9 @@
// 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
@@ -29,8 +29,10 @@
#include "Journal.h"
#include "ArgsJournalExpand.h"
+
#include <iostream>
#include <sstream>
+#include <string.h>
using namespace qmf::com::redhat::rhm::store;
using qpid::management::ManagementAgent;
@@ -58,7 +60,7 @@
readPageSize = 0;
readPages = 0;
initialFileCount = 0;
- autoExpand = 0;
+ autoExpand = false;
currentFileCount = 0;
maxFileCount = 0;
dataFileSize = 0;
@@ -87,11 +89,13 @@
for (int idx = 0; idx < maxThreads; idx++)
perThreadStatsArray[idx] = 0;
+
}
Journal::~Journal ()
{
+
for (int idx = 0; idx < maxThreads; idx++)
if (perThreadStatsArray[idx] != 0)
delete perThreadStatsArray[idx];
@@ -741,7 +745,6 @@
}
-
void Journal::mapEncodeValues (::qpid::types::Variant::Map& _map,
bool includeProperties,
bool includeStatistics)
@@ -832,42 +835,68 @@
if ((_i = _map.find("queueRef")) != _map.end()) {
queueRef = _i->second;
+ } else {
+ queueRef = ::qpid::management::ObjectId();
}
if ((_i = _map.find("name")) != _map.end()) {
name = (_i->second).getString();
+ } else {
+ name = "";
}
if ((_i = _map.find("directory")) != _map.end()) {
directory = (_i->second).getString();
+ } else {
+ directory = "";
}
if ((_i = _map.find("baseFileName")) != _map.end()) {
baseFileName = (_i->second).getString();
+ } else {
+ baseFileName = "";
}
if ((_i = _map.find("writePageSize")) != _map.end()) {
writePageSize = _i->second;
+ } else {
+ writePageSize = 0;
}
if ((_i = _map.find("writePages")) != _map.end()) {
writePages = _i->second;
+ } else {
+ writePages = 0;
}
if ((_i = _map.find("readPageSize")) != _map.end()) {
readPageSize = _i->second;
+ } else {
+ readPageSize = 0;
}
if ((_i = _map.find("readPages")) != _map.end()) {
readPages = _i->second;
+ } else {
+ readPages = 0;
}
if ((_i = _map.find("initialFileCount")) != _map.end()) {
initialFileCount = _i->second;
+ } else {
+ initialFileCount = 0;
}
if ((_i = _map.find("autoExpand")) != _map.end()) {
autoExpand = _i->second;
+ } else {
+ autoExpand = false;
}
if ((_i = _map.find("currentFileCount")) != _map.end()) {
currentFileCount = _i->second;
+ } else {
+ currentFileCount = 0;
}
if ((_i = _map.find("maxFileCount")) != _map.end()) {
maxFileCount = _i->second;
+ } else {
+ maxFileCount = 0;
}
if ((_i = _map.find("dataFileSize")) != _map.end()) {
dataFileSize = _i->second;
+ } else {
+ dataFileSize = 0;
}
}
@@ -883,6 +912,8 @@
::qpid::types::Variant::Map::const_iterator _i;
if ((_i = inMap.find("by")) != inMap.end()) {
ioArgs.i_by = _i->second;
+ } else {
+ ioArgs.i_by = 0;
}
bool allow = coreObject->AuthorizeMethod(METHOD_EXPAND, ioArgs, userId);
if (allow)
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Journal.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -1,6 +1,6 @@
-#ifndef _MANAGEMENT_JOURNAL_
-#define _MANAGEMENT_JOURNAL_
+#ifndef _MANAGEMENT_COM_REDHAT_RHM_STORE_JOURNAL_
+#define _MANAGEMENT_COM_REDHAT_RHM_STORE_JOURNAL_
//
// Licensed to the Apache Software Foundation (ASF) under one
@@ -25,6 +25,9 @@
// Please do not edit.
#include "qpid/management/ManagementObject.h"
+#include "qmf/BrokerImportExport.h"
+#include <boost/shared_ptr.hpp>
+#include <limits>
namespace qpid {
namespace management {
@@ -39,7 +42,7 @@
namespace store {
-class Journal : public ::qpid::management::ManagementObject
+QPID_BROKER_CLASS_EXTERN class Journal : public ::qpid::management::ManagementObject
{
private:
@@ -85,6 +88,8 @@
// Per-Thread Statistics
+
+ public:
struct PerThreadStats {
uint64_t enqueues;
uint64_t dequeues;
@@ -99,6 +104,7 @@
uint64_t readBusyFailures;
};
+ private:
struct PerThreadStats** perThreadStatsArray;
@@ -127,44 +133,50 @@
void aggregatePerThreadStats(struct PerThreadStats*) const;
public:
- static void writeSchema(std::string& schema);
- void mapEncodeValues(::qpid::types::Variant::Map& map,
- bool includeProperties=true,
- bool includeStatistics=true);
- void mapDecodeValues(const ::qpid::types::Variant::Map& map);
- void doMethod(std::string& methodName,
- const ::qpid::types::Variant::Map& inMap,
- ::qpid::types::Variant::Map& outMap,
- const std::string& userId);
- std::string getKey() const;
+ typedef boost::shared_ptr<Journal> shared_ptr;
- uint32_t writePropertiesSize() const;
- void readProperties(const std::string& buf);
- void writeProperties(std::string& buf) const;
- void writeStatistics(std::string& buf, bool skipHeaders = false);
- void doMethod(std::string& methodName,
- const std::string& inBuf,
- std::string& outBuf,
- const std::string& userId);
+ QPID_BROKER_EXTERN static void writeSchema(std::string& schema);
+ QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map,
+ bool includeProperties=true,
+ bool includeStatistics=true);
+ QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map);
+ QPID_BROKER_EXTERN void doMethod(std::string& methodName,
+ const ::qpid::types::Variant::Map& inMap,
+ ::qpid::types::Variant::Map& outMap,
+ const std::string& userId);
+ QPID_BROKER_EXTERN std::string getKey() const;
+ QPID_BROKER_EXTERN uint32_t writePropertiesSize() const;
+ QPID_BROKER_EXTERN void readProperties(const std::string& buf);
+ QPID_BROKER_EXTERN void writeProperties(std::string& buf) const;
+ QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false);
+ QPID_BROKER_EXTERN void doMethod(std::string& methodName,
+ const std::string& inBuf,
+ std::string& outBuf,
+ const std::string& userId);
+
writeSchemaCall_t getWriteSchemaCall() { return writeSchema; }
- Journal(::qpid::management::ManagementAgent* agent,
- ::qpid::management::Manageable* coreObject);
- ~Journal();
+ QPID_BROKER_EXTERN Journal(
+ ::qpid::management::ManagementAgent* agent,
+ ::qpid::management::Manageable* coreObject);
+ QPID_BROKER_EXTERN ~Journal();
+
void setReference(::qpid::management::ObjectId objectId) { queueRef = objectId; }
- static void registerSelf(::qpid::management::ManagementAgent* agent);
+ QPID_BROKER_EXTERN static void registerSelf(
+ ::qpid::management::ManagementAgent* agent);
+
std::string& getPackageName() const { return packageName; }
std::string& getClassName() const { return className; }
uint8_t* getMd5Sum() const { return md5Sum; }
// Method IDs
- static const uint32_t METHOD_EXPAND = 1;
+ QPID_BROKER_EXTERN static const uint32_t METHOD_EXPAND = 1;
// Accessor Methods
inline void set_queueRef (const ::qpid::management::ObjectId& val) {
@@ -457,6 +469,11 @@
instChanged = true;
}
+
+
+ struct PerThreadStats* getStatistics() { return getThreadStats(); }
+ void statisticsUpdated() { instChanged = true; }
+
};
}}}}}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Package.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Package.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Package.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -25,6 +25,7 @@
// Please do not edit.
#include "qpid/management/ManagementAgent.h"
+#include "qmf/BrokerImportExport.h"
namespace qmf {
namespace com {
@@ -36,8 +37,8 @@
class Package
{
public:
- Package (::qpid::management::ManagementAgent* agent);
- ~Package () {}
+ QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent);
+ QPID_BROKER_EXTERN ~Package () {}
};
}}}}}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.cpp
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -7,9 +7,9 @@
// 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
@@ -28,8 +28,10 @@
#include "qpid/management/ManagementAgent.h"
#include "Store.h"
+
#include <iostream>
#include <sstream>
+#include <string.h>
using namespace qmf::com::redhat::rhm::store;
using qpid::management::ManagementAgent;
@@ -47,11 +49,11 @@
Store::Store (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent) :
ManagementObject(_core)
{
- brokerRef = _parent->GetManagementObject ()->getObjectId ();
+ brokerRef = _parent->GetManagementObject()->getObjectId();
location = "";
defaultInitialFileCount = 0;
defaultDataFileSize = 0;
- tplIsInitialized = 0;
+ tplIsInitialized = false;
tplDirectory = "";
tplWritePageSize = 0;
tplWritePages = 0;
@@ -71,11 +73,13 @@
for (int idx = 0; idx < maxThreads; idx++)
perThreadStatsArray[idx] = 0;
+
}
Store::~Store ()
{
+
for (int idx = 0; idx < maxThreads; idx++)
if (perThreadStatsArray[idx] != 0)
delete perThreadStatsArray[idx];
@@ -485,7 +489,6 @@
}
-
void Store::mapEncodeValues (::qpid::types::Variant::Map& _map,
bool includeProperties,
bool includeStatistics)
@@ -546,36 +549,58 @@
if ((_i = _map.find("brokerRef")) != _map.end()) {
brokerRef = _i->second;
+ } else {
+ brokerRef = ::qpid::management::ObjectId();
}
if ((_i = _map.find("location")) != _map.end()) {
location = (_i->second).getString();
+ } else {
+ location = "";
}
if ((_i = _map.find("defaultInitialFileCount")) != _map.end()) {
defaultInitialFileCount = _i->second;
+ } else {
+ defaultInitialFileCount = 0;
}
if ((_i = _map.find("defaultDataFileSize")) != _map.end()) {
defaultDataFileSize = _i->second;
+ } else {
+ defaultDataFileSize = 0;
}
if ((_i = _map.find("tplIsInitialized")) != _map.end()) {
tplIsInitialized = _i->second;
+ } else {
+ tplIsInitialized = false;
}
if ((_i = _map.find("tplDirectory")) != _map.end()) {
tplDirectory = (_i->second).getString();
+ } else {
+ tplDirectory = "";
}
if ((_i = _map.find("tplWritePageSize")) != _map.end()) {
tplWritePageSize = _i->second;
+ } else {
+ tplWritePageSize = 0;
}
if ((_i = _map.find("tplWritePages")) != _map.end()) {
tplWritePages = _i->second;
+ } else {
+ tplWritePages = 0;
}
if ((_i = _map.find("tplInitialFileCount")) != _map.end()) {
tplInitialFileCount = _i->second;
+ } else {
+ tplInitialFileCount = 0;
}
if ((_i = _map.find("tplDataFileSize")) != _map.end()) {
tplDataFileSize = _i->second;
+ } else {
+ tplDataFileSize = 0;
}
if ((_i = _map.find("tplCurrentFileCount")) != _map.end()) {
tplCurrentFileCount = _i->second;
+ } else {
+ tplCurrentFileCount = 0;
}
}
Modified: store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.h
===================================================================
--- store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.h 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/gen/qmf/com/redhat/rhm/store/Store.h 2013-01-02 20:15:03 UTC (rev 4527)
@@ -1,6 +1,6 @@
-#ifndef _MANAGEMENT_STORE_
-#define _MANAGEMENT_STORE_
+#ifndef _MANAGEMENT_COM_REDHAT_RHM_STORE_STORE_
+#define _MANAGEMENT_COM_REDHAT_RHM_STORE_STORE_
//
// Licensed to the Apache Software Foundation (ASF) under one
@@ -25,6 +25,9 @@
// Please do not edit.
#include "qpid/management/ManagementObject.h"
+#include "qmf/BrokerImportExport.h"
+#include <boost/shared_ptr.hpp>
+#include <limits>
namespace qpid {
namespace management {
@@ -39,7 +42,7 @@
namespace store {
-class Store : public ::qpid::management::ManagementObject
+QPID_BROKER_CLASS_EXTERN class Store : public ::qpid::management::ManagementObject
{
private:
@@ -71,12 +74,15 @@
// Per-Thread Statistics
+
+ public:
struct PerThreadStats {
uint64_t tplTxnPrepares;
uint64_t tplTxnCommits;
uint64_t tplTxnAborts;
};
+ private:
struct PerThreadStats** perThreadStatsArray;
@@ -97,37 +103,43 @@
void aggregatePerThreadStats(struct PerThreadStats*) const;
public:
- static void writeSchema(std::string& schema);
- void mapEncodeValues(::qpid::types::Variant::Map& map,
- bool includeProperties=true,
- bool includeStatistics=true);
- void mapDecodeValues(const ::qpid::types::Variant::Map& map);
- void doMethod(std::string& methodName,
- const ::qpid::types::Variant::Map& inMap,
- ::qpid::types::Variant::Map& outMap,
- const std::string& userId);
- std::string getKey() const;
+ typedef boost::shared_ptr<Store> shared_ptr;
- uint32_t writePropertiesSize() const;
- void readProperties(const std::string& buf);
- void writeProperties(std::string& buf) const;
- void writeStatistics(std::string& buf, bool skipHeaders = false);
- void doMethod(std::string& methodName,
- const std::string& inBuf,
- std::string& outBuf,
- const std::string& userId);
+ QPID_BROKER_EXTERN static void writeSchema(std::string& schema);
+ QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map,
+ bool includeProperties=true,
+ bool includeStatistics=true);
+ QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map);
+ QPID_BROKER_EXTERN void doMethod(std::string& methodName,
+ const ::qpid::types::Variant::Map& inMap,
+ ::qpid::types::Variant::Map& outMap,
+ const std::string& userId);
+ QPID_BROKER_EXTERN std::string getKey() const;
+ QPID_BROKER_EXTERN uint32_t writePropertiesSize() const;
+ QPID_BROKER_EXTERN void readProperties(const std::string& buf);
+ QPID_BROKER_EXTERN void writeProperties(std::string& buf) const;
+ QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false);
+ QPID_BROKER_EXTERN void doMethod(std::string& methodName,
+ const std::string& inBuf,
+ std::string& outBuf,
+ const std::string& userId);
+
writeSchemaCall_t getWriteSchemaCall() { return writeSchema; }
- Store(::qpid::management::ManagementAgent* agent,
- ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent);
- ~Store();
+ QPID_BROKER_EXTERN Store(
+ ::qpid::management::ManagementAgent* agent,
+ ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent);
+ QPID_BROKER_EXTERN ~Store();
+
- static void registerSelf(::qpid::management::ManagementAgent* agent);
+ QPID_BROKER_EXTERN static void registerSelf(
+ ::qpid::management::ManagementAgent* agent);
+
std::string& getPackageName() const { return packageName; }
std::string& getClassName() const { return className; }
uint8_t* getMd5Sum() const { return md5Sum; }
@@ -287,6 +299,11 @@
instChanged = true;
}
+
+
+ struct PerThreadStats* getStatistics() { return getThreadStats(); }
+ void statisticsUpdated() { instChanged = true; }
+
};
}}}}}
Modified: store/branches/qpid-0.18/lib/jrnl/deq_rec.cpp
===================================================================
--- store/branches/qpid-0.18/lib/jrnl/deq_rec.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/jrnl/deq_rec.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -115,7 +115,7 @@
{
if (wsize > rem)
wsize = rem;
- std::memcpy(wptr, (char*)_xidp + rec_offs, wsize);
+ std::memcpy(wptr, (const char*)_xidp + rec_offs, wsize);
wr_cnt += wsize;
rem -= wsize;
}
@@ -143,7 +143,7 @@
std::size_t wsize = _deq_hdr._xidsize > rec_offs ? _deq_hdr._xidsize - rec_offs : 0;
if (wsize)
{
- std::memcpy(wptr, (char*)_xidp + rec_offs, wsize);
+ std::memcpy(wptr, (const char*)_xidp + rec_offs, wsize);
wr_cnt += wsize;
}
rec_offs -= _deq_hdr._xidsize - wsize;
Modified: store/branches/qpid-0.18/lib/jrnl/enq_rec.cpp
===================================================================
--- store/branches/qpid-0.18/lib/jrnl/enq_rec.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/jrnl/enq_rec.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -142,7 +142,7 @@
{
if (wsize > rem)
wsize = rem;
- std::memcpy((char*)wptr + wr_cnt, (char*)_data + rec_offs, wsize);
+ std::memcpy((char*)wptr + wr_cnt, (const char*)_data + rec_offs, wsize);
wr_cnt += wsize;
rem -= wsize;
}
@@ -171,14 +171,14 @@
std::size_t wsize = _enq_hdr._xidsize > rec_offs ? _enq_hdr._xidsize - rec_offs : 0;
if (wsize)
{
- std::memcpy(wptr, (char*)_xidp + rec_offs, wsize);
+ std::memcpy(wptr, (const char*)_xidp + rec_offs, wsize);
wr_cnt += wsize;
}
rec_offs -= _enq_hdr._xidsize - wsize;
wsize = _enq_hdr._dsize > rec_offs ? _enq_hdr._dsize - rec_offs : 0;
if (wsize && !_enq_hdr.is_external())
{
- std::memcpy((char*)wptr + wr_cnt, (char*)_data + rec_offs, wsize);
+ std::memcpy((char*)wptr + wr_cnt, (const char*)_data + rec_offs, wsize);
wr_cnt += wsize;
}
rec_offs -= _enq_hdr._dsize - wsize;
Modified: store/branches/qpid-0.18/lib/jrnl/jcntl.cpp
===================================================================
--- store/branches/qpid-0.18/lib/jrnl/jcntl.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/jrnl/jcntl.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -955,7 +955,7 @@
ofsp.seekp(file_pos);
void* buff = std::malloc(JRNL_DBLK_SIZE);
assert(buff != 0);
- std::memcpy(buff, (void*)&xmagic, sizeof(xmagic));
+ std::memcpy(buff, (const void*)&xmagic, sizeof(xmagic));
// Normally, RHM_CLEAN must be set before these fills are done, but this is a recover
// situation (i.e. performance is not an issue), and it makes the location of the write
// clear should inspection of the file be required.
Modified: store/branches/qpid-0.18/lib/jrnl/txn_rec.cpp
===================================================================
--- store/branches/qpid-0.18/lib/jrnl/txn_rec.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/jrnl/txn_rec.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -115,7 +115,7 @@
{
if (wsize > rem)
wsize = rem;
- std::memcpy(wptr, (char*)_xidp + rec_offs, wsize);
+ std::memcpy(wptr, (const char*)_xidp + rec_offs, wsize);
wr_cnt += wsize;
rem -= wsize;
}
@@ -143,7 +143,7 @@
std::size_t wsize = _txn_hdr._xidsize > rec_offs ? _txn_hdr._xidsize - rec_offs : 0;
if (wsize)
{
- std::memcpy(wptr, (char*)_xidp + rec_offs, wsize);
+ std::memcpy(wptr, (const char*)_xidp + rec_offs, wsize);
wr_cnt += wsize;
}
rec_offs -= _txn_hdr._xidsize - wsize;
Modified: store/branches/qpid-0.18/lib/jrnl/wmgr.cpp
===================================================================
--- store/branches/qpid-0.18/lib/jrnl/wmgr.cpp 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/lib/jrnl/wmgr.cpp 2013-01-02 20:15:03 UTC (rev 4527)
@@ -193,7 +193,7 @@
if (xid_len) // If part of transaction, add to transaction map
{
- std::string xid((char*)xid_ptr, xid_len);
+ std::string xid((const char*)xid_ptr, xid_len);
_tmap.insert_txn_data(xid, txn_data(rid, 0, dtokp->fid(), true));
}
else
@@ -293,7 +293,7 @@
{
// If the enqueue is part of a pending txn, it will not yet be in emap
_emap.lock(dequeue_rid); // ignore rid not found error
- std::string xid((char*)xid_ptr, xid_len);
+ std::string xid((const char*)xid_ptr, xid_len);
_tmap.insert_txn_data(xid, txn_data(rid, dequeue_rid, dtokp->fid(), false));
}
else
@@ -390,7 +390,7 @@
dtokp->set_wstate(data_tok::ABORT_SUBM);
// Delete this txn from tmap, unlock any locked records in emap
- std::string xid((char*)xid_ptr, xid_len);
+ std::string xid((const char*)xid_ptr, xid_len);
txn_data_list tdl = _tmap.get_remove_tdata_list(xid); // tdl will be empty if xid not found
for (tdl_itr itr = tdl.begin(); itr != tdl.end(); itr++)
{
@@ -480,7 +480,7 @@
dtokp->set_wstate(data_tok::COMMIT_SUBM);
// Delete this txn from tmap, process records into emap
- std::string xid((char*)xid_ptr, xid_len);
+ std::string xid((const char*)xid_ptr, xid_len);
txn_data_list tdl = _tmap.get_remove_tdata_list(xid); // tdl will be empty if xid not found
for (tdl_itr itr = tdl.begin(); itr != tdl.end(); itr++)
{
@@ -961,7 +961,7 @@
while (_cached_offset_dblks < wdblks)
{
void* wptr = (void*)((char*)_page_ptr_arr[_pg_index] + _pg_offset_dblks * JRNL_DBLK_SIZE);
- std::memcpy(wptr, (void*)&xmagic, sizeof(xmagic));
+ std::memcpy(wptr, (const void*)&xmagic, sizeof(xmagic));
#ifdef RHM_CLEAN
std::memset((char*)wptr + sizeof(xmagic), RHM_CLEAN_CHAR, JRNL_DBLK_SIZE - sizeof(xmagic));
#endif
Modified: store/branches/qpid-0.18/tests/Makefile.am
===================================================================
--- store/branches/qpid-0.18/tests/Makefile.am 2012-12-21 02:23:46 UTC (rev 4526)
+++ store/branches/qpid-0.18/tests/Makefile.am 2013-01-02 20:15:03 UTC (rev 4527)
@@ -22,7 +22,7 @@
abs_builddir=@abs_builddir@
abs_srcdir=@abs_srcdir@
-AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS) $(QPID_CXXFLAGS) -DBOOST_TEST_DYN_LINK
+AM_CXXFLAGS = $(WARNING_CFLAGS) $(APR_CXXFLAGS) $(QPID_CXXFLAGS) -DBOOST_TEST_DYN_LINK -D_IN_QPID_BROKER
INCLUDES=-I$(top_srcdir)/lib -I$(abs_builddir)/../lib -I$(top_srcdir)/lib/gen
@@ -117,4 +117,4 @@
check-short: all
$(MAKE) check TESTS="$(SHORT_TESTS)" SUBDIRS=.
-
+
12 years