diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-06-08 13:05:22 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-06-08 13:05:22 +0200 |
commit | b2538adea86a17fccbacf87814361f050c97ae7e (patch) | |
tree | db900e7f606ca8ce9d114f11cf3ac2e9cc2abaf4 /cpp/src/IceGrid/ServerCache.h | |
parent | Fix IceSSL.CertFile property typo (diff) | |
download | ice-b2538adea86a17fccbacf87814361f050c97ae7e.tar.bz2 ice-b2538adea86a17fccbacf87814361f050c97ae7e.tar.xz ice-b2538adea86a17fccbacf87814361f050c97ae7e.zip |
Fixed ICE-6573 - IceGrid application update failure when updating server with allocatables and clients are waiting to allocate the allocatable
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.h')
-rw-r--r-- | cpp/src/IceGrid/ServerCache.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h index 4f87bd7fa59..f6b32e5c5de 100644 --- a/cpp/src/IceGrid/ServerCache.h +++ b/cpp/src/IceGrid/ServerCache.h @@ -55,7 +55,7 @@ typedef IceUtil::Handle<CheckUpdateResult> CheckUpdateResultPtr; class ServerEntry : public Allocatable { public: - + ServerEntry(ServerCache&, const std::string&); void sync(); @@ -91,7 +91,7 @@ public: bool canRemove(); CheckUpdateResultPtr checkUpdate(const ServerInfo&, bool); bool isDestroyed(); - + void loadCallback(const ServerPrx&, const AdapterPrxDict&, int, int); void destroyCallback(); void exception(const Ice::Exception&); @@ -102,7 +102,7 @@ public: virtual void releasedNoSync(const SessionIPtr&); private: - + void syncImpl(); void waitImpl(int); void synchronized(); @@ -140,21 +140,25 @@ public: ServerCache(const Ice::CommunicatorPtr&, const std::string&, NodeCache&, AdapterCache&, ObjectCache&, AllocatableObjectCache&); - ServerEntryPtr add(const ServerInfo&, bool); + ServerEntryPtr add(const ServerInfo&); ServerEntryPtr get(const std::string&) const; bool has(const std::string&) const; - ServerEntryPtr remove(const std::string&, bool = true, bool = false); + ServerEntryPtr remove(const std::string&, bool); + + void preUpdate(const ServerInfo&, bool); + ServerEntryPtr postUpdate(const ServerInfo&, bool); void clear(const std::string&); - + NodeCache& getNodeCache() const { return _nodeCache; } Ice::CommunicatorPtr getCommunicator() const { return _communicator; } const std::string& getInstanceName() const { return _instanceName; } private: - - void addCommunicator(const CommunicatorDescriptorPtr&, const ServerEntryPtr&, const std::string&); - void removeCommunicator(const CommunicatorDescriptorPtr&, const ServerEntryPtr&); + + void addCommunicator(const CommunicatorDescriptorPtr&, const CommunicatorDescriptorPtr&, const ServerEntryPtr&, + const std::string&); + void removeCommunicator(const CommunicatorDescriptorPtr&, const CommunicatorDescriptorPtr&, const ServerEntryPtr&); friend struct AddCommunicator; friend struct RemoveCommunicator; |