summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-10-15 21:35:38 +0000
committerAlan Conway <aconway@apache.org>2012-10-15 21:35:38 +0000
commit9e114b78691c803ba735be6deb872ae6470c48ac (patch)
treebf9088c46d4b2c7b1eecaaed9af26fd8d9c7b669 /cpp/include
parentfe2472dc0166502aaed08e8ffe4caa0811daab32 (diff)
downloadqpid-python-9e114b78691c803ba735be6deb872ae6470c48ac.tar.gz
MQPID-4286: QMF queries for HA replication take too long to process (Jason Dillaman)
Rework ManagementAgent locks, get rid of shared buffers that were points of contention. Minor log message improvements in ha code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1398530 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/qpid/management/Manageable.h2
-rw-r--r--cpp/include/qpid/management/ManagementObject.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/cpp/include/qpid/management/Manageable.h b/cpp/include/qpid/management/Manageable.h
index 1e5cd8bc42..fd1e604f58 100644
--- a/cpp/include/qpid/management/Manageable.h
+++ b/cpp/include/qpid/management/Manageable.h
@@ -55,7 +55,7 @@ class QPID_COMMON_EXTERN Manageable
//
// This accessor function returns a pointer to the management object.
//
- virtual ManagementObject* GetManagementObject(void) const = 0;
+ virtual ManagementObject::shared_ptr GetManagementObject(void) const = 0;
// Every "Manageable" object must implement ManagementMethod. This
// function is called when a remote management client invokes a method
diff --git a/cpp/include/qpid/management/ManagementObject.h b/cpp/include/qpid/management/ManagementObject.h
index 16bf21038c..2aca6fb1c5 100644
--- a/cpp/include/qpid/management/ManagementObject.h
+++ b/cpp/include/qpid/management/ManagementObject.h
@@ -25,7 +25,7 @@
#include "qpid/management/Mutex.h"
#include "qpid/types/Variant.h"
-
+#include <boost/shared_ptr.hpp>
#include <map>
#include <vector>
@@ -155,6 +155,8 @@ protected:
QPID_COMMON_EXTERN uint32_t writeTimestampsSize() const;
public:
+ typedef boost::shared_ptr<ManagementObject> shared_ptr;
+
QPID_COMMON_EXTERN static const uint8_t MD5_LEN = 16;
QPID_COMMON_EXTERN static int maxThreads;
//typedef void (*writeSchemaCall_t) (qpid::framing::Buffer&);
@@ -227,8 +229,8 @@ protected:
//QPID_COMMON_EXTERN void mapDecode(const types::Variant::Map& map);
};
-typedef std::map<ObjectId, ManagementObject*> ManagementObjectMap;
-typedef std::vector<ManagementObject*> ManagementObjectVector;
+typedef std::map<ObjectId, ManagementObject::shared_ptr> ManagementObjectMap;
+typedef std::vector<ManagementObject::shared_ptr> ManagementObjectVector;
}}