diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-07-30 14:06:55 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-07-30 14:06:55 +0000 |
| commit | 8cba19c48210f14a36b92046005914036201be47 (patch) | |
| tree | ad13a3512b6f4d4f9ec9036001c2116f60d4902f /cpp/src/qpid/broker | |
| parent | 9c095c4cd694287151cc1fabcc274fd435944dee (diff) | |
| download | qpid-python-8cba19c48210f14a36b92046005914036201be47.tar.gz | |
Change remaining broker Timer clients to use the single broker Timer
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799274 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
| -rw-r--r-- | cpp/src/qpid/broker/Broker.h | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/LinkRegistry.cpp | 10 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/LinkRegistry.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/Broker.h b/cpp/src/qpid/broker/Broker.h index 0f0db9e11b..0517ceca95 100644 --- a/cpp/src/qpid/broker/Broker.h +++ b/cpp/src/qpid/broker/Broker.h @@ -122,6 +122,7 @@ public: void declareStandardExchange(const std::string& name, const std::string& type); boost::shared_ptr<sys::Poller> poller; + sys::Timer timer; Options config; ProtocolFactoryMap protocolFactories; std::auto_ptr<MessageStore> store; @@ -132,7 +133,6 @@ public: ExchangeRegistry exchanges; LinkRegistry links; boost::shared_ptr<sys::ConnectionCodec::Factory> factory; - sys::Timer timer; DtxManager dtxManager; SessionManager sessionManager; management::ManagementAgent* managementAgent; diff --git a/cpp/src/qpid/broker/LinkRegistry.cpp b/cpp/src/qpid/broker/LinkRegistry.cpp index 7ef6ce5301..c70392eb23 100644 --- a/cpp/src/qpid/broker/LinkRegistry.cpp +++ b/cpp/src/qpid/broker/LinkRegistry.cpp @@ -41,18 +41,18 @@ namespace _qmf = qmf::org::apache::qpid::broker; // factored: The persistence element and maintenance element // should be factored separately LinkRegistry::LinkRegistry () : - broker(0), + broker(0), timer(0), parent(0), store(0), passive(false), passiveChanged(false), realm("") { } LinkRegistry::LinkRegistry (Broker* _broker) : - broker(_broker), - parent(0), store(0), passive(false), passiveChanged(false), + broker(_broker), timer(&broker->getTimer()), + parent(0), store(0), passive(false), passiveChanged(false), realm(broker->getOptions().realm) { - timer.add (new Periodic(*this)); + timer->add (new Periodic(*this)); } LinkRegistry::Periodic::Periodic (LinkRegistry& _links) : @@ -61,7 +61,7 @@ LinkRegistry::Periodic::Periodic (LinkRegistry& _links) : void LinkRegistry::Periodic::fire () { links.periodicMaintenance (); - links.timer.add (new Periodic(links)); + links.timer->add (new Periodic(links)); } void LinkRegistry::periodicMaintenance () diff --git a/cpp/src/qpid/broker/LinkRegistry.h b/cpp/src/qpid/broker/LinkRegistry.h index c32203c2b0..d1a4201c82 100644 --- a/cpp/src/qpid/broker/LinkRegistry.h +++ b/cpp/src/qpid/broker/LinkRegistry.h @@ -62,7 +62,7 @@ namespace broker { qpid::sys::Mutex lock; Broker* broker; - sys::Timer timer; + sys::Timer* timer; management::Manageable* parent; MessageStore* store; bool passive; |
