diff options
Diffstat (limited to 'qpid/cpp/src/qpid/broker/LinkRegistry.h')
-rw-r--r-- | qpid/cpp/src/qpid/broker/LinkRegistry.h | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/qpid/cpp/src/qpid/broker/LinkRegistry.h b/qpid/cpp/src/qpid/broker/LinkRegistry.h index e66fca7d6b..ef4871192f 100644 --- a/qpid/cpp/src/qpid/broker/LinkRegistry.h +++ b/qpid/cpp/src/qpid/broker/LinkRegistry.h @@ -10,9 +10,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -27,7 +27,6 @@ #include "qpid/broker/MessageStore.h" #include "qpid/Address.h" #include "qpid/sys/Mutex.h" -#include "qpid/sys/Timer.h" #include "qpid/management/Manageable.h" #include <boost/shared_ptr.hpp> #include <boost/intrusive_ptr.hpp> @@ -40,40 +39,19 @@ namespace broker { class Broker; class Connection; class LinkRegistry { - - // Declare a timer task to manage the establishment of link connections and the - // re-establishment of lost link connections. - struct Periodic : public sys::TimerTask - { - LinkRegistry& links; - - Periodic(LinkRegistry& links); - virtual ~Periodic() {}; - void fire(); - }; - typedef std::map<std::string, boost::shared_ptr<Link> > LinkMap; typedef std::map<std::string, Bridge::shared_ptr> BridgeMap; - typedef std::map<std::string, Address> AddressMap; LinkMap links; - LinkMap linksToDestroy; BridgeMap bridges; - BridgeMap bridgesToDestroy; - AddressMap reMappings; qpid::sys::Mutex lock; Broker* broker; - sys::Timer* timer; - boost::intrusive_ptr<qpid::sys::TimerTask> maintenanceTask; management::Manageable* parent; MessageStore* store; bool passive; - bool passiveChanged; std::string realm; - void periodicMaintenance (); - bool updateAddress(const std::string& oldKey, const Address& newAddress); boost::shared_ptr<Link> findLink(const std::string& key); static std::string createKey(const Address& address); static std::string createKey(const std::string& host, uint16_t port); @@ -147,6 +125,7 @@ namespace broker { * Called by links failing over to new address */ void changeAddress(const Address& oldAddress, const Address& newAddress); + /** * Called to alter passive state. In passive state the links * and bridges managed by a link registry will be recorded and @@ -155,7 +134,7 @@ namespace broker { */ void setPassive(bool); - + /** Iterate over each link in the registry. Used for cluster updates. */ void eachLink(boost::function<void(boost::shared_ptr<Link>)> f); /** Iterate over each bridge in the registry. Used for cluster updates. */ |