diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-11-23 14:44:51 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-11-23 14:44:51 +0000 |
commit | ad476fdda5c9a9f23b9e65fc3c4b3016f7704848 (patch) | |
tree | 329b46efefd33095fe3ed8dc92ef3d8726cd0857 /cpp/src/IceGrid/NodeCache.h | |
parent | Remove deprecated methods (diff) | |
download | ice-ad476fdda5c9a9f23b9e65fc3c4b3016f7704848.tar.bz2 ice-ad476fdda5c9a9f23b9e65fc3c4b3016f7704848.tar.xz ice-ad476fdda5c9a9f23b9e65fc3c4b3016f7704848.zip |
Code cleanup and fixed startup scalability issue of the registry (it no
longer contacts all the nodes).
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.h')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/NodeCache.h b/cpp/src/IceGrid/NodeCache.h index 6060ec912c5..e2228f275f2 100644 --- a/cpp/src/IceGrid/NodeCache.h +++ b/cpp/src/IceGrid/NodeCache.h @@ -31,7 +31,7 @@ typedef IceUtil::Handle<ServerEntry> ServerEntryPtr; class ReplicaCache; -class NodeEntry : public IceUtil::Monitor<IceUtil::Mutex> +class NodeEntry : public IceUtil::Monitor<IceUtil::RecMutex> { public: @@ -44,6 +44,7 @@ public: void addServer(const ServerEntryPtr&); void removeServer(const ServerEntryPtr&); void setSession(const NodeSessionIPtr&); + void setSavedProxy(const NodePrx&); NodePrx getProxy() const; NodeInfo getInfo() const; @@ -59,6 +60,11 @@ public: void __incRef(); void __decRef(); + void checkSession() const; + void setProxy(const NodePrx&); + void finishedRegistration(); + void finishedRegistration(const Ice::Exception&); + private: ServerDescriptorPtr getServerDescriptor(const ServerInfo&, const SessionIPtr&); @@ -70,6 +76,9 @@ private: NodeSessionIPtr _session; std::map<std::string, ServerEntryPtr> _servers; std::map<std::string, NodeDescriptor> _descriptors; + + mutable bool _registering; + mutable NodePrx _proxy; }; typedef IceUtil::Handle<NodeEntry> NodeEntryPtr; |