diff options
author | Benoit Foucher <benoit@zeroc.com> | 2010-02-19 18:45:14 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2010-02-19 18:45:14 +0100 |
commit | ea9a8bcfc079175205766491ab217e65536a656f (patch) | |
tree | 8dd6cd069f9966bd59d72587052a42195d45cf63 /cpp/src/IceGrid/ServerCache.h | |
parent | added txt to ICE_LICENSE (diff) | |
download | ice-ea9a8bcfc079175205766491ab217e65536a656f.tar.bz2 ice-ea9a8bcfc079175205766491ab217e65536a656f.tar.xz ice-ea9a8bcfc079175205766491ab217e65536a656f.zip |
Fixed bug 4677 - IceGrid update hang
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; }; |