diff options
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.h')
-rw-r--r-- | cpp/src/IceGrid/ServerCache.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h index fdec9781b8a..82f7621885e 100644 --- a/cpp/src/IceGrid/ServerCache.h +++ b/cpp/src/IceGrid/ServerCache.h @@ -37,18 +37,28 @@ public: ServerEntry(ServerCache&, const std::string&); void sync(); - void syncAndWait(); - void waitNoThrow(); + void waitForSync(int); + void waitForSync() + { + waitForSync(-1); + } + void waitForSyncNoThrow(int); + void waitForSyncNoThrow() + { + waitForSyncNoThrow(-1); + } void unsync(); + bool addSyncCallback(const SynchronizationCallbackPtr&); + void update(const ServerInfo&); void destroy(); ServerInfo getInfo(bool = false) const; std::string getId() const; - ServerPrx getProxy(int&, int&, std::string&, bool = true); - ServerPrx getProxy(bool = true); + ServerPrx getProxy(int&, int&, std::string&, bool = true, int = 0); + ServerPrx getProxy(bool = true, int = 0); Ice::ObjectPrx getAdminProxy(); AdapterPrx getAdapter(const std::string&, bool); @@ -70,8 +80,10 @@ public: private: void syncImpl(); - void waitImpl(); - + void waitImpl(int); + void synchronized(); + void synchronized(const Ice::Exception&); + ServerCache& _cache; const std::string _id; std::auto_ptr<ServerInfo> _loaded; @@ -86,6 +98,7 @@ private: bool _synchronizing; bool _updated; std::auto_ptr<Ice::Exception> _exception; + std::vector<SynchronizationCallbackPtr> _callbacks; SessionIPtr _session; }; |