diff options
| author | Ted Ross <tross@apache.org> | 2010-04-23 21:00:10 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-04-23 21:00:10 +0000 |
| commit | ce41c9d094746451b674bebe5edb4e61116e77c2 (patch) | |
| tree | 7083ac3b3ef29835053e128047b1baa671cec2c2 /cpp/src/qpid/cluster/ClusterPlugin.cpp | |
| parent | 74b68e0be99c74b8f59ef97a3a9162d5a8dfe257 (diff) | |
| download | qpid-python-ce41c9d094746451b674bebe5edb4e61116e77c2.tar.gz | |
Code cleanup
- Removed IdAllocator (it's no longer needed)
- Cleaned up the calls to ManagementAgent::addObject to handle durable objects
- Removed the deferred call to addObject for durable objects
- Removed unneeded calls to self._checkClosed() in qmf.console.Agent
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@937516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterPlugin.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 3192896956..955487ee03 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -32,7 +32,6 @@ #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" -#include "qpid/management/IdAllocator.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" @@ -48,7 +47,6 @@ namespace cluster { using namespace std; using broker::Broker; -using management::IdAllocator; using management::ManagementAgent; @@ -77,46 +75,6 @@ struct ClusterOptions : public Options { } }; -struct UpdateClientIdAllocator : management::IdAllocator -{ - qpid::sys::AtomicValue<uint64_t> sequence; - - UpdateClientIdAllocator() : sequence(0x4000000000000000LL) {} - - uint64_t getIdFor(management::Manageable* m) - { - if (isUpdateQueue(m) || isUpdateExchange(m) || isUpdateSession(m) || isUpdateBinding(m)) { - return ++sequence; - } else { - return 0; - } - } - - bool isUpdateQueue(management::Manageable* manageable) - { - qpid::broker::Queue* queue = dynamic_cast<qpid::broker::Queue*>(manageable); - return queue && queue->getName() == UpdateClient::UPDATE; - } - - bool isUpdateExchange(management::Manageable* manageable) - { - qpid::broker::Exchange* exchange = dynamic_cast<qpid::broker::Exchange*>(manageable); - return exchange && exchange->getName() == UpdateClient::UPDATE; - } - - bool isUpdateSession(management::Manageable* manageable) - { - broker::SessionState* session = dynamic_cast<broker::SessionState*>(manageable); - return session && session->getId().getName() == UpdateClient::UPDATE; - } - - bool isUpdateBinding(management::Manageable* manageable) - { - broker::Exchange::Binding* binding = dynamic_cast<broker::Exchange::Binding*>(manageable); - return binding && binding->queue->getName() == UpdateClient::UPDATE; - } -}; - struct ClusterPlugin : public Plugin { ClusterSettings settings; @@ -139,11 +97,6 @@ struct ClusterPlugin : public Plugin { broker->setConnectionFactory( boost::shared_ptr<sys::ConnectionCodec::Factory>( new ConnectionCodec::Factory(broker->getConnectionFactory(), *cluster))); - ManagementAgent* mgmt = broker->getManagementAgent(); - if (mgmt) { - std::auto_ptr<IdAllocator> allocator(new UpdateClientIdAllocator()); - mgmt->setAllocator(allocator); - } } void disallowManagementMethods(ManagementAgent* agent) { |
