Author: tedross
Date: 2008-07-08 17:55:05 -0400 (Tue, 08 Jul 2008)
New Revision: 2184
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/BdbMessageStore.h
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/gen/qpid/management/Journal.cpp
store/trunk/cpp/lib/gen/qpid/management/Journal.h
store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.cpp
store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.h
store/trunk/cpp/lib/gen/qpid/management/Store.cpp
store/trunk/cpp/lib/gen/qpid/management/Store.h
Log:
Removed boost::shared_ptr from management-agent interface
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2008-07-08 21:55:05 UTC (rev 2184)
@@ -63,7 +63,8 @@
wcache_num_pages(JRNL_WMGR_DEF_PAGES),
highestRid(0),
isInit(false),
- envPath(envpath)
+ envPath(envpath),
+ mgmtObject(0)
{}
@@ -71,12 +72,12 @@
{
if (broker != 0)
{
- ManagementAgent::shared_ptr agent = ManagementAgent::getAgent ();
+ ManagementAgent* agent = ManagementAgent::getAgent ();
- if (agent.get () != 0)
+ if (agent != 0)
{
qpid::management::PackageMrgstore packageInitializer(agent);
- mgmtObject = qpid::management::Store::shared_ptr(new qpid::management::Store
(agent.get(), this, broker));
+ mgmtObject = new qpid::management::Store (agent, this, broker);
mgmtObject->set_location(storeDir);
mgmtObject->set_defaultInitialFileCount(numJrnlFiles);
@@ -265,7 +266,7 @@
QPID_LOG(error, "Unknown error in
BdbMessageStore::~BdbMessageStore()");
}
- if (mgmtObject.get() != 0)
+ if (mgmtObject != 0)
mgmtObject->resourceDestroy();
}
Modified: store/trunk/cpp/lib/BdbMessageStore.h
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.h 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/BdbMessageStore.h 2008-07-08 21:55:05 UTC (rev 2184)
@@ -96,7 +96,7 @@
const char* envPath;
static qpid::sys::Duration defJournalGetEventsTimeout;
static qpid::sys::Duration defJournalFlushTimeout;
- qpid::management::Store::shared_ptr mgmtObject;
+ qpid::management::Store* mgmtObject;
qpid::sys::Mutex jrnlCreateLock;
bool mode(const bool mode, const bool force);
@@ -236,7 +236,7 @@
void commit(qpid::broker::TransactionContext& ctxt);
void abort(qpid::broker::TransactionContext& ctxt);
- qpid::management::ManagementObject::shared_ptr GetManagementObject (void) const
+ qpid::management::ManagementObject* GetManagementObject (void) const
{ return mgmtObject; }
qpid::management::Manageable::status_t ManagementMethod (uint32_t,
qpid::management::Args&)
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2008-07-08 21:55:05 UTC (rev 2184)
@@ -27,7 +27,7 @@
#include "jrnl/jexception.hpp"
#include "jrnl/slock.hpp"
#include "qpid/log/Statement.h"
-#include "qpid/management/ManagementAgent.h"
+#include "qpid/agent/ManagementAgent.h"
#include "qpid/management/ArgsJournalExpand.h"
#include "qpid/management/ArgsJournalReconfigure.h"
#include "qpid/sys/Monitor.h"
@@ -60,7 +60,8 @@
_datap(0),
_dlen(0),
_dtok(),
- _external(false)
+ _external(false),
+ _mgmtObject(0)
{
::pthread_mutex_init(&_getf_mutex, 0);
getEventsFireEventsPtr = new GetEventsFireEvent(this, getEventsTimeout);
@@ -72,12 +73,11 @@
journalTimerPtr->start();
journalTimerPtr->add(inactivityFireEventPtr);
- ManagementAgent::shared_ptr agent = ManagementAgent::getAgent ();
+ ManagementAgent* agent = ManagementAgent::getAgent ();
- if (agent.get () != 0)
+ if (agent != 0)
{
- _mgmtObject = qpid::management::Journal::shared_ptr
- (new qpid::management::Journal(agent.get(), (qpid::management::Manageable*)
this));
+ _mgmtObject = new qpid::management::Journal(agent,
(qpid::management::Manageable*) this);
_mgmtObject->set_name(journalId);
_mgmtObject->set_directory(journalDirectory);
@@ -111,7 +111,7 @@
journalTimerPtr = 0;
}
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
_mgmtObject->resourceDestroy();
::pthread_mutex_destroy(&_getf_mutex);
@@ -135,7 +135,7 @@
wr_cb);
log(LOG_DEBUG, "Initialization complete");
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->set_initialFileCount(_num_jfiles);
_mgmtObject->set_dataFileSize(_jfsize_sblks * JRNL_SBLK_SIZE *
JRNL_DBLK_SIZE);
@@ -205,7 +205,7 @@
oss2 << "; journal now read-only.";
log(LOG_DEBUG, oss2.str());
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->set_initialFileCount(_num_jfiles);
_mgmtObject->set_dataFileSize(_jfsize_sblks * JRNL_SBLK_SIZE *
JRNL_DBLK_SIZE);
@@ -300,7 +300,7 @@
{
handleIoResult(jcntl::enqueue_data_record(data_buff, tot_data_len, this_data_len,
dtokp, transient));
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->inc_recordEnqueues();
_mgmtObject->inc_recordDepth();
@@ -313,7 +313,7 @@
{
handleIoResult(jcntl::enqueue_extern_data_record(tot_data_len, dtokp, transient));
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->inc_recordEnqueues();
_mgmtObject->inc_recordDepth();
@@ -326,7 +326,7 @@
{
handleIoResult(jcntl::enqueue_txn_data_record(data_buff, tot_data_len, this_data_len,
dtokp, xid, transient));
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->inc_recordEnqueues();
_mgmtObject->inc_recordDepth();
@@ -339,7 +339,7 @@
{
handleIoResult(jcntl::enqueue_extern_txn_data_record(tot_data_len, dtokp, xid,
transient));
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->inc_recordEnqueues();
_mgmtObject->inc_recordDepth();
@@ -351,7 +351,7 @@
{
handleIoResult(jcntl::dequeue_data_record(dtokp));
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->inc_recordDequeues();
_mgmtObject->dec_recordDepth();
@@ -363,7 +363,7 @@
{
handleIoResult(jcntl::dequeue_txn_data_record(dtokp, xid));
- if (_mgmtObject.get() != 0)
+ if (_mgmtObject != 0)
{
_mgmtObject->inc_recordDequeues();
_mgmtObject->dec_recordDepth();
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/JournalImpl.h 2008-07-08 21:55:05 UTC (rev 2184)
@@ -87,7 +87,7 @@
size_t _dlen;
journal::data_tok _dtok;
bool _external;
- qpid::management::Journal::shared_ptr _mgmtObject;
+ qpid::management::Journal* _mgmtObject;
public:
JournalImpl(const std::string& journalId,
@@ -177,7 +177,7 @@
void getEventsFire();
void flushFire();
- qpid::management::ManagementObject::shared_ptr GetManagementObject (void)
const
+ qpid::management::ManagementObject* GetManagementObject (void) const
{ return _mgmtObject; }
qpid::management::Manageable::status_t ManagementMethod (uint32_t,
@@ -200,10 +200,10 @@
// Management instrumentation callbacks overridden from jcntl
inline void instr_incr_outstanding_aio_cnt() {
- if (_mgmtObject.get() != 0) _mgmtObject->inc_outstandingAIOs();
+ if (_mgmtObject != 0) _mgmtObject->inc_outstandingAIOs();
}
inline void instr_decr_outstanding_aio_cnt() {
- if (_mgmtObject.get() != 0) _mgmtObject->dec_outstandingAIOs();
+ if (_mgmtObject != 0) _mgmtObject->dec_outstandingAIOs();
}
}; // class JournalImpl
Modified: store/trunk/cpp/lib/gen/qpid/management/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/Journal.cpp 2008-07-08 19:04:25 UTC (rev
2183)
+++ store/trunk/cpp/lib/gen/qpid/management/Journal.cpp 2008-07-08 21:55:05 UTC (rev
2184)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/management/ManagementAgent.h"
+#include "qpid/agent/ManagementAgent.h"
#include "Journal.h"
#include "qpid/management/ArgsJournalExpand.h"
Modified: store/trunk/cpp/lib/gen/qpid/management/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/Journal.h 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/gen/qpid/management/Journal.h 2008-07-08 21:55:05 UTC (rev 2184)
@@ -118,7 +118,6 @@
public:
friend class PackageMrgstore;
- typedef boost::shared_ptr<Journal> shared_ptr;
Journal (ManagementAgent* agent,
Manageable* coreObject);
Modified: store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.cpp 2008-07-08 19:04:25 UTC
(rev 2183)
+++ store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.cpp 2008-07-08 21:55:05 UTC
(rev 2184)
@@ -28,7 +28,7 @@
using namespace qpid::management;
-PackageMrgstore::PackageMrgstore (ManagementAgent::shared_ptr agent)
+PackageMrgstore::PackageMrgstore (ManagementAgent* agent)
{
agent->RegisterClass (Store::packageName, Store::className, Store::md5Sum,
Store::writeSchema);
agent->RegisterClass (Journal::packageName, Journal::className, Journal::md5Sum,
Journal::writeSchema);
Modified: store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.h
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.h 2008-07-08 19:04:25 UTC (rev
2183)
+++ store/trunk/cpp/lib/gen/qpid/management/PackageMrgstore.h 2008-07-08 21:55:05 UTC (rev
2184)
@@ -24,7 +24,7 @@
// This source file was created by a code generator.
// Please do not edit.
-#include "qpid/management/ManagementAgent.h"
+#include "qpid/agent/ManagementAgent.h"
namespace qpid {
namespace management {
@@ -32,7 +32,7 @@
class PackageMrgstore
{
public:
- PackageMrgstore (ManagementAgent::shared_ptr agent);
+ PackageMrgstore (ManagementAgent* agent);
~PackageMrgstore () {}
};
Modified: store/trunk/cpp/lib/gen/qpid/management/Store.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/Store.cpp 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/gen/qpid/management/Store.cpp 2008-07-08 21:55:05 UTC (rev 2184)
@@ -24,7 +24,7 @@
#include "qpid/log/Statement.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/management/Manageable.h"
-#include "qpid/management/ManagementAgent.h"
+#include "qpid/agent/ManagementAgent.h"
#include "Store.h"
Modified: store/trunk/cpp/lib/gen/qpid/management/Store.h
===================================================================
--- store/trunk/cpp/lib/gen/qpid/management/Store.h 2008-07-08 19:04:25 UTC (rev 2183)
+++ store/trunk/cpp/lib/gen/qpid/management/Store.h 2008-07-08 21:55:05 UTC (rev 2184)
@@ -64,7 +64,6 @@
public:
friend class PackageMrgstore;
- typedef boost::shared_ptr<Store> shared_ptr;
Store (ManagementAgent* agent,
Manageable* coreObject, Manageable* _parent);