diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-09-09 09:07:44 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-09-09 09:07:44 +0200 |
commit | 8c7e7e7f6eb0716ae3afddc6c58f8c54a64ed960 (patch) | |
tree | 613bf342ca4aaabd9fe8d4add49fa9b9f1616292 /cpp/src/Ice/ConnectionFactory.h | |
parent | Bug 3459 - use rand_s on windows for random number generation (diff) | |
download | ice-8c7e7e7f6eb0716ae3afddc6c58f8c54a64ed960.tar.bz2 ice-8c7e7e7f6eb0716ae3afddc6c58f8c54a64ed960.tar.xz ice-8c7e7e7f6eb0716ae3afddc6c58f8c54a64ed960.zip |
More scalable connection reaping
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.h')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.h b/cpp/src/Ice/ConnectionFactory.h index 417d8b30d43..34603d11530 100644 --- a/cpp/src/Ice/ConnectionFactory.h +++ b/cpp/src/Ice/ConnectionFactory.h @@ -73,10 +73,9 @@ private: ConnectorInfo(const ConnectorPtr& c, const EndpointIPtr& e) : connector(c), endpoint(e) { } - - bool operator<(const ConnectorInfo& other) const; + bool operator==(const ConnectorInfo& other) const; - + ConnectorPtr connector; EndpointIPtr endpoint; }; @@ -139,13 +138,14 @@ private: Ice::ConnectionIPtr createConnection(const TransceiverPtr&, const ConnectorInfo&); void handleException(const Ice::LocalException&, bool); - void handleException(const Ice::LocalException&, const ConnectorInfo&, const Ice::ConnectionIPtr&, bool); + void handleConnectionException(const Ice::LocalException&, bool); const InstancePtr _instance; + const ConnectionReaperPtr _reaper; bool _destroyed; - std::multimap<ConnectorInfo, Ice::ConnectionIPtr> _connections; - std::map<ConnectorInfo, std::set<ConnectCallbackPtr> > _pending; + std::multimap<ConnectorPtr, Ice::ConnectionIPtr> _connections; + std::map<ConnectorPtr, std::set<ConnectCallbackPtr> > _pending; std::multimap<EndpointIPtr, Ice::ConnectionIPtr> _connectionsByEndpoint; int _pendingConnectCount; @@ -168,7 +168,7 @@ public: EndpointIPtr endpoint() const; std::list<Ice::ConnectionIPtr> connections() const; void flushBatchRequests(); - + // // Operations from EventHandler // @@ -203,6 +203,7 @@ private: void setState(State); const InstancePtr _instance; + const ConnectionReaperPtr _reaper; AcceptorPtr _acceptor; const TransceiverPtr _transceiver; @@ -212,7 +213,7 @@ private: const bool _warn; - std::list<Ice::ConnectionIPtr> _connections; + std::set<Ice::ConnectionIPtr> _connections; State _state; }; |