summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.h')
-rw-r--r--cpp/src/IceGrid/ServerCache.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/cpp/src/IceGrid/ServerCache.h b/cpp/src/IceGrid/ServerCache.h
index 7cca66ce1a8..f73039e2f08 100644
--- a/cpp/src/IceGrid/ServerCache.h
+++ b/cpp/src/IceGrid/ServerCache.h
@@ -12,9 +12,10 @@
#include <IceUtil/Mutex.h>
#include <IceUtil/Shared.h>
+#include <Ice/UniquePtr.h>
#include <IceGrid/Descriptor.h>
#include <IceGrid/Internal.h>
-#include <IceGrid/Query.h>
+#include <IceGrid/Registry.h>
#include <IceGrid/Allocatable.h>
#include <IceGrid/Cache.h>
@@ -33,6 +34,9 @@ typedef IceUtil::Handle<NodeEntry> NodeEntryPtr;
class CheckServerResult;
typedef IceUtil::Handle<CheckServerResult> CheckServerResultPtr;
+class NodeObserverTopic;
+typedef IceUtil::Handle<NodeObserverTopic> NodeObserverTopicPtr;
+
class CheckUpdateResult : public IceUtil::Shared
{
public:
@@ -96,6 +100,7 @@ public:
void destroyCallback();
void exception(const Ice::Exception&);
+ virtual bool isEnabled() const;
virtual void allocated(const SessionIPtr&);
virtual void allocatedNoSync(const SessionIPtr&);
virtual void released(const SessionIPtr&);
@@ -110,9 +115,9 @@ private:
ServerCache& _cache;
const std::string _id;
- IceUtil::UniquePtr<ServerInfo> _loaded;
- IceUtil::UniquePtr<ServerInfo> _load;
- IceUtil::UniquePtr<ServerInfo> _destroy;
+ IceInternal::UniquePtr<ServerInfo> _loaded;
+ IceInternal::UniquePtr<ServerInfo> _load;
+ IceInternal::UniquePtr<ServerInfo> _destroy;
ServerPrx _proxy;
AdapterPrxDict _adapters;
@@ -121,7 +126,7 @@ private:
bool _synchronizing;
bool _updated;
- IceUtil::UniquePtr<Ice::Exception> _exception;
+ IceInternal::UniquePtr<Ice::Exception> _exception;
bool _noRestart;
std::vector<SynchronizationCallbackPtr> _callbacks;
@@ -138,7 +143,8 @@ public:
using CacheByString<ServerEntry>::remove;
#endif
- ServerCache(const Ice::CommunicatorPtr&, const std::string&, NodeCache&, AdapterCache&, ObjectCache&, AllocatableObjectCache&);
+ ServerCache(const Ice::CommunicatorPtr&, const std::string&, NodeCache&, AdapterCache&, ObjectCache&,
+ AllocatableObjectCache&);
ServerEntryPtr add(const ServerInfo&);
ServerEntryPtr get(const std::string&) const;
@@ -154,6 +160,9 @@ public:
Ice::CommunicatorPtr getCommunicator() const { return _communicator; }
const std::string& getInstanceName() const { return _instanceName; }
+ const NodeObserverTopicPtr& getNodeObserverTopic() const { return _nodeObserverTopic; }
+ void setNodeObserverTopic(const NodeObserverTopicPtr&);
+
private:
void addCommunicator(const CommunicatorDescriptorPtr&, const CommunicatorDescriptorPtr&, const ServerEntryPtr&,
@@ -169,6 +178,7 @@ private:
AdapterCache& _adapterCache;
ObjectCache& _objectCache;
AllocatableObjectCache& _allocatableObjectCache;
+ NodeObserverTopicPtr _nodeObserverTopic;
};
};