diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-08-30 14:43:15 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-08-30 14:43:15 +0200 |
commit | aab12cf1719b425b5a2c571b8938d47cdd71d151 (patch) | |
tree | 876561b05764721306eb8629883e7b0b9cbbc99a /cpp/src/IceGrid/ServerCache.h | |
parent | minor g++ warning (diff) | |
download | ice-aab12cf1719b425b5a2c571b8938d47cdd71d151.tar.bz2 ice-aab12cf1719b425b5a2c571b8938d47cdd71d151.tar.xz ice-aab12cf1719b425b5a2c571b8938d47cdd71d151.zip |
ICE-4774: Merged skype_props enhancement
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.h')
-rw-r--r-- | cpp/src/IceGrid/ServerCache.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h index f1db17fa9b6..866ba3652aa 100644 --- a/cpp/src/IceGrid/ServerCache.h +++ b/cpp/src/IceGrid/ServerCache.h @@ -29,6 +29,28 @@ class NodeCache; class NodeEntry; typedef IceUtil::Handle<NodeEntry> NodeEntryPtr; +class CheckServerResult; +typedef IceUtil::Handle<CheckServerResult> CheckServerResultPtr; + +class CheckUpdateResult : public IceUtil::Shared +{ +public: + + CheckUpdateResult(const std::string&, const std::string&, bool, const Ice::AsyncResultPtr&); + + bool getResult(); + + const std::string& getServer() { return _server; } + +private: + + const std::string _server; + const std::string _node; + const bool _noRestart; + const Ice::AsyncResultPtr _result; +}; +typedef IceUtil::Handle<CheckUpdateResult> CheckUpdateResultPtr; + class ServerEntry : public Allocatable { public: @@ -50,7 +72,8 @@ public: bool addSyncCallback(const SynchronizationCallbackPtr&); - void update(const ServerInfo&); + void update(const ServerInfo&, bool); + void destroy(); ServerInfo getInfo(bool = false) const; @@ -65,6 +88,7 @@ public: float getLoad(LoadSample) const; bool canRemove(); + CheckUpdateResultPtr checkUpdate(const ServerInfo&, bool); bool isDestroyed(); void loadCallback(const ServerPrx&, const AdapterPrxDict&, int, int); @@ -96,6 +120,7 @@ private: bool _synchronizing; bool _updated; + bool _noRestart; std::auto_ptr<Ice::Exception> _exception; std::vector<SynchronizationCallbackPtr> _callbacks; @@ -114,7 +139,7 @@ public: ServerCache(const Ice::CommunicatorPtr&, const std::string&, NodeCache&, AdapterCache&, ObjectCache&, AllocatableObjectCache&); - ServerEntryPtr add(const ServerInfo&); + ServerEntryPtr add(const ServerInfo&, bool); ServerEntryPtr get(const std::string&) const; bool has(const std::string&) const; ServerEntryPtr remove(const std::string&, bool = true); |