diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-12-04 19:43:10 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-12-04 19:43:10 +0000 |
commit | 996be326b98f2c5bb776ba68dd2b3d8b2861a12a (patch) | |
tree | 446bb318a97f7e64b35f299407f03868942c7c0f /cpp/src/IceGrid/NodeSessionManager.h | |
parent | Removed -single_module, it doesn't seem to be neccessary anymore (diff) | |
download | ice-996be326b98f2c5bb776ba68dd2b3d8b2861a12a.tar.bz2 ice-996be326b98f2c5bb776ba68dd2b3d8b2861a12a.tar.xz ice-996be326b98f2c5bb776ba68dd2b3d8b2861a12a.zip |
More cleanup
Diffstat (limited to 'cpp/src/IceGrid/NodeSessionManager.h')
-rw-r--r-- | cpp/src/IceGrid/NodeSessionManager.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/NodeSessionManager.h b/cpp/src/IceGrid/NodeSessionManager.h index 5d28f060aca..ea5895e25d9 100644 --- a/cpp/src/IceGrid/NodeSessionManager.h +++ b/cpp/src/IceGrid/NodeSessionManager.h @@ -54,19 +54,23 @@ public: void create(const NodeIPtr&); void create(const InternalRegistryPrx&); - void activated(); + void activate(); bool waitForCreate(); void terminate(); void destroy(); - void replicaAdded(const InternalRegistryPrx&, bool); + void replicaInit(const InternalRegistryPrxSeq&); + void replicaAdded(const InternalRegistryPrx&); void replicaRemoved(const InternalRegistryPrx&); NodeSessionPrx getMasterNodeSession() const { return _thread->getSession(); } private: - void syncReplicas(const InternalRegistryPrxSeq&); + void createReplicaSession(const InternalRegistryPrx&, bool); + + void reapReplicas(); + void syncServers(const NodeSessionPrx&); class Thread : public NodeSessionKeepAliveThread @@ -84,9 +88,25 @@ private: { NodeSessionPrx session = NodeSessionKeepAliveThread::createSession(master, timeout); _manager.createdSession(session); + _manager.reapReplicas(); return session; } + virtual void + destroySession(const NodeSessionPrx& session) + { + NodeSessionKeepAliveThread::destroySession(session); + _manager.reapReplicas(); + } + + virtual bool + keepAlive(const NodeSessionPrx& session) + { + bool alive = NodeSessionKeepAliveThread::keepAlive(session); + _manager.reapReplicas(); + return alive; + } + private: NodeSessionManager& _manager; @@ -106,6 +126,7 @@ private: typedef std::map<Ice::Identity, NodeSessionKeepAliveThreadPtr> NodeSessionMap; NodeSessionMap _sessions; + std::set<Ice::Identity> _replicas; }; } |