diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-09-14 18:50:17 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-09-14 18:50:17 +0000 |
commit | a7da4de2000e9738ed895e534e782e82125ac2c0 (patch) | |
tree | 367b47c719e4860fb096ec5fc51aee0ae3034cb9 /cpp/src/IceGrid/NodeCache.h | |
parent | Fix (diff) | |
download | ice-a7da4de2000e9738ed895e534e782e82125ac2c0.tar.bz2 ice-a7da4de2000e9738ed895e534e782e82125ac2c0.tar.xz ice-a7da4de2000e9738ed895e534e782e82125ac2c0.zip |
Fixed TODOs
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.h')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/NodeCache.h b/cpp/src/IceGrid/NodeCache.h index 4ebec4f9a19..cfedcea35b6 100644 --- a/cpp/src/IceGrid/NodeCache.h +++ b/cpp/src/IceGrid/NodeCache.h @@ -31,12 +31,13 @@ typedef IceUtil::Handle<ServerEntry> ServerEntryPtr; class ReplicaCache; -class NodeEntry : public IceUtil::Shared, public IceUtil::Mutex +class NodeEntry : public IceUtil::Monitor<IceUtil::Mutex> { public: NodeEntry(NodeCache&, const std::string&); - + virtual ~NodeEntry(); + void addDescriptor(const std::string&, const NodeDescriptor&); void removeDescriptor(const std::string&); @@ -55,11 +56,16 @@ public: void destroyServer(const ServerEntryPtr&, const ServerInfo&); ServerInfo getServerInfo(const ServerInfo&, const SessionIPtr&); + void __incRef(); + void __decRef(); + private: ServerDescriptorPtr getServerDescriptor(const ServerInfo&, const SessionIPtr&); NodeCache& _cache; + IceUtil::Mutex _refMutex; + int _ref; const std::string _name; NodeSessionIPtr _session; std::map<std::string, ServerEntryPtr> _servers; |