From 66c90d8aa45c5767bf3e8da8cb9cd049f0faa000 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 19 Dec 2012 21:22:13 +0000 Subject: QPID-4514: Remove obsolete cluster code: ManagementAgent, Timer, doc WIP: rip out old cluster code, misc. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424118 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/Makefile.am | 2 +- qpid/cpp/src/qpid/agent/ManagementAgentImpl.h | 4 - qpid/cpp/src/qpid/amqp_0_10/Connection.cpp | 4 - qpid/cpp/src/qpid/amqp_0_10/Connection.h | 4 - qpid/cpp/src/qpid/broker/Broker.cpp | 2 - qpid/cpp/src/qpid/management/ManagementAgent.cpp | 9 +- qpid/cpp/src/qpid/management/ManagementAgent.h | 9 - qpid/cpp/src/qpid/sys/Timer.cpp | 6 - qpid/cpp/src/qpid/sys/Timer.h | 4 - qpid/cpp/xml/cluster.xml | 339 ----------------------- 10 files changed, 3 insertions(+), 380 deletions(-) delete mode 100644 qpid/cpp/xml/cluster.xml (limited to 'qpid/cpp') diff --git a/qpid/cpp/Makefile.am b/qpid/cpp/Makefile.am index 0bb2e7500a..374f09ebaf 100644 --- a/qpid/cpp/Makefile.am +++ b/qpid/cpp/Makefile.am @@ -24,7 +24,7 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ LICENSE NOTICE README.txt SSL RELEASE_NOTES DESIGN \ - xml/cluster.xml INSTALL-WINDOWS CMakeLists.txt BuildInstallSettings.cmake \ + INSTALL-WINDOWS CMakeLists.txt BuildInstallSettings.cmake \ packaging/NSIS QPID_VERSION.txt bindings/CMakeLists.txt \ bindings/swig_python_typemaps.i bindings/swig_ruby_typemaps.i bindings/swig_perl_typemaps.i \ include/qpid/qpid.i include/qmf/qmfengine.i include/qmf/qmf2.i diff --git a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h index d801989f64..4c97bc89da 100644 --- a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h +++ b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h @@ -92,10 +92,6 @@ class ManagementAgentImpl : public ManagementAgent, public client::MessageListen uint16_t getInterval() { return interval; } void periodicProcessing(); - // these next are here to support the hot-wiring of state between clustered brokers - uint64_t getNextObjectId(void) { return nextObjectId; } - void setNextObjectId(uint64_t o) { nextObjectId = o; } - uint16_t getBootSequence(void) { return bootSequence; } void setBootSequence(uint16_t b) { bootSequence = b; } diff --git a/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp b/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp index 8cb675202e..15df439c9c 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp +++ b/qpid/cpp/src/qpid/amqp_0_10/Connection.cpp @@ -146,10 +146,6 @@ framing::ProtocolVersion Connection::getVersion() const { return version; } -void Connection::setVersion(const framing::ProtocolVersion& v) { - version = v; -} - size_t Connection::getBuffered() const { Mutex::ScopedLock l(frameQueueLock); return buffered; diff --git a/qpid/cpp/src/qpid/amqp_0_10/Connection.h b/qpid/cpp/src/qpid/amqp_0_10/Connection.h index 4a08ee51fd..2ac9edf7a2 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Connection.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Connection.h @@ -72,10 +72,6 @@ class Connection : public sys::ConnectionCodec, void send(framing::AMQFrame&); framing::ProtocolVersion getVersion() const; size_t getBuffered() const; - - /** Used by cluster code to set a special version on "update" connections. */ - // FIXME aconway 2009-07-30: find a cleaner mechanism for this. - void setVersion(const framing::ProtocolVersion&); }; }} // namespace qpid::amqp_0_10 diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp index 094dd63527..2cf428e48b 100644 --- a/qpid/cpp/src/qpid/broker/Broker.cpp +++ b/qpid/cpp/src/qpid/broker/Broker.cpp @@ -356,8 +356,6 @@ Broker::Broker(const Broker::Options& conf) : } } - if (managementAgent.get()) managementAgent->pluginsInitialized(); - if (conf.queueCleanInterval) { queueCleaner.start(conf.queueCleanInterval * qpid::sys::TIME_SEC); } diff --git a/qpid/cpp/src/qpid/management/ManagementAgent.cpp b/qpid/cpp/src/qpid/management/ManagementAgent.cpp index 7b8808c0a0..e9994714f7 100644 --- a/qpid/cpp/src/qpid/management/ManagementAgent.cpp +++ b/qpid/cpp/src/qpid/management/ManagementAgent.cpp @@ -170,6 +170,8 @@ void ManagementAgent::configure(const string& _dataDir, bool _publish, uint16_t sendQueue.reset( new EventQueue(boost::bind(&ManagementAgent::sendEvents, this, _1), broker->getPoller())); sendQueue->start(); + timer = &broker->getTimer(); + timer->add(new Periodic(*this, interval)); // Get from file or generate and save to file. if (dataDir.empty()) @@ -212,13 +214,6 @@ void ManagementAgent::configure(const string& _dataDir, bool _publish, uint16_t } } -void ManagementAgent::pluginsInitialized() { - // Do this here so cluster plugin has the chance to set up the timer. - timer = &broker->getClusterTimer(); - timer->add(new Periodic(*this, interval)); -} - - void ManagementAgent::setName(const string& vendor, const string& product, const string& instance) { if (vendor.find(':') != vendor.npos) { diff --git a/qpid/cpp/src/qpid/management/ManagementAgent.h b/qpid/cpp/src/qpid/management/ManagementAgent.h index 7f1a2e3e66..d3e72abc71 100644 --- a/qpid/cpp/src/qpid/management/ManagementAgent.h +++ b/qpid/cpp/src/qpid/management/ManagementAgent.h @@ -75,11 +75,6 @@ public: /** Called before plugins are initialized */ void configure (const std::string& dataDir, bool publish, uint16_t interval, qpid::broker::Broker* broker, int threadPoolSize); - /** Called after plugins are initialized. */ - void pluginsInitialized(); - - /** Called by cluster to suppress management output during update. */ - void suppress(bool s) { suppressed = s; } void setName(const std::string& vendor, const std::string& product, @@ -138,10 +133,6 @@ public: /** Decode a serialized agent map */ void importAgents(framing::Buffer& inBuf); - // these are in support of the managementSetup-state stuff, for synch'ing clustered brokers - uint64_t getNextObjectId(void) { return nextObjectId; } - void setNextObjectId(uint64_t o) { nextObjectId = o; } - uint16_t getBootSequence(void) { return bootSequence; } void setBootSequence(uint16_t b) { bootSequence = b; writeData(); } diff --git a/qpid/cpp/src/qpid/sys/Timer.cpp b/qpid/cpp/src/qpid/sys/Timer.cpp index 83d1a5260b..6947c787b4 100644 --- a/qpid/cpp/src/qpid/sys/Timer.cpp +++ b/qpid/cpp/src/qpid/sys/Timer.cpp @@ -96,12 +96,6 @@ void TimerTask::cancel() { state = CANCELLED; } -void TimerTask::setFired() { - // Set nextFireTime to just before now, making readyToFire() true. - nextFireTime = AbsTime(sys::now(), Duration(-1)); -} - - Timer::Timer() : active(false), late(50 * TIME_MSEC), diff --git a/qpid/cpp/src/qpid/sys/Timer.h b/qpid/cpp/src/qpid/sys/Timer.h index 5731b8d977..cd08e12e1a 100644 --- a/qpid/cpp/src/qpid/sys/Timer.h +++ b/qpid/cpp/src/qpid/sys/Timer.h @@ -67,10 +67,6 @@ class TimerTask : public RefCounted { std::string getName() const { return name; } - // Move the nextFireTime so readyToFire is true. - // Used by the cluster, where tasks are fired on cluster events, not on local time. - QPID_COMMON_EXTERN void setFired(); - protected: // Must be overridden with callback virtual void fire() = 0; diff --git a/qpid/cpp/xml/cluster.xml b/qpid/cpp/xml/cluster.xml deleted file mode 100644 index 09434ea37b..0000000000 --- a/qpid/cpp/xml/cluster.xml +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - Qpid extension class to allow clustered brokers to communicate. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.1