diff options
author | Kim van der Riet <kpvdr@apache.org> | 2013-02-28 16:14:30 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2013-02-28 16:14:30 +0000 |
commit | 9c73ef7a5ac10acd6a50d5d52bd721fc2faa5919 (patch) | |
tree | 2a890e1df09e5b896a9b4168a7b22648f559a1f2 /cpp/src/qpid/broker/Link.h | |
parent | 172d9b2a16cfb817bbe632d050acba7e31401cd2 (diff) | |
download | qpid-python-asyncstore.tar.gz |
Update from trunk r1375509 through r1450773asyncstore
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1451244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Link.h')
-rw-r--r-- | cpp/src/qpid/broker/Link.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/cpp/src/qpid/broker/Link.h b/cpp/src/qpid/broker/Link.h index f0cb90e73b..01ddc68d97 100644 --- a/cpp/src/qpid/broker/Link.h +++ b/cpp/src/qpid/broker/Link.h @@ -69,12 +69,11 @@ class Link : public PersistableConfig, public management::Manageable { std::string username; std::string password; mutable uint64_t persistenceId; - qmf::org::apache::qpid::broker::Link* mgmtObject; + qmf::org::apache::qpid::broker::Link::shared_ptr mgmtObject; Broker* broker; int state; uint32_t visitCount; uint32_t currentInterval; - bool closing; Url url; // URL can contain many addresses. size_t reconnectNext; // Index for next re-connect attempt @@ -82,7 +81,8 @@ class Link : public PersistableConfig, public management::Manageable { Bridges created; // Bridges pending creation Bridges active; // Bridges active Bridges cancellations; // Bridges pending cancellation - uint channelCounter; + framing::ChannelId nextFreeChannel; + RangeSet<framing::ChannelId> freeChannels; Connection* connection; management::ManagementAgent* agent; boost::function<void(Link*)> listener; @@ -97,7 +97,7 @@ class Link : public PersistableConfig, public management::Manageable { static const int STATE_OPERATIONAL = 3; static const int STATE_FAILED = 4; static const int STATE_CLOSED = 5; - static const int STATE_PASSIVE = 6; + static const int STATE_CLOSING = 6; // Waiting for outstanding connect to complete first static const uint32_t MAX_INTERVAL = 32; @@ -106,7 +106,6 @@ class Link : public PersistableConfig, public management::Manageable { void destroy(); // Cleanup connection before link goes away void ioThreadProcessing(); // Called on connection's IO thread by request bool tryFailoverLH(); // Called during maintenance visit - bool hideManagement() const; void reconnectLH(const Address&); //called by LinkRegistry // connection management (called by LinkRegistry) @@ -115,7 +114,6 @@ class Link : public PersistableConfig, public management::Manageable { void closed(int, std::string); // Called when connection goes away void notifyConnectionForced(const std::string text); void closeConnection(const std::string& reason); - bool pendingConnection(const std::string& host, uint16_t port) const; // is Link trying to connect to this remote? friend class LinkRegistry; // to call established, opened, closed @@ -151,7 +149,8 @@ class Link : public PersistableConfig, public management::Manageable { bool isDurable() { return durable; } void maintenanceVisit (); - uint nextChannel(); + framing::ChannelId nextChannel(); // allocate channel from link free pool + void returnChannel(framing::ChannelId); // return channel to link free pool void add(Bridge::shared_ptr); void cancel(Bridge::shared_ptr); @@ -165,7 +164,6 @@ class Link : public PersistableConfig, public management::Manageable { std::string getPassword() { return password; } Broker* getBroker() { return broker; } - void setPassive(bool p); bool isConnecting() const { return state == STATE_CONNECTING; } // PersistableConfig: @@ -181,17 +179,13 @@ class Link : public PersistableConfig, public management::Manageable { static bool isEncodedLink(const std::string& key); // Manageable entry points - management::ManagementObject* GetManagementObject(void) const; + management::ManagementObject::shared_ptr GetManagementObject(void) const; management::Manageable::status_t ManagementMethod(uint32_t, management::Args&, std::string&); // manage the exchange owned by this link static const std::string exchangeTypeName; static boost::shared_ptr<Exchange> linkExchangeFactory(const std::string& name); - // replicate internal state of this Link for clustering - void getState(framing::FieldTable& state) const; - void setState(const framing::FieldTable& state); - /** create a name for a link (if none supplied by user config) */ static std::string createName(const std::string& transport, const std::string& host, |