summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerCache.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-02-10 18:42:18 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-02-10 18:42:18 +0100
commit3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11 (patch)
tree8a2475dda8b95d5b837bdf5415a1a968c57642c1 /cpp/src/IceGrid/ServerCache.cpp
parentFix (ICE-7331) - IceGridGUI preference preservation (diff)
downloadice-3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11.tar.bz2
ice-3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11.tar.xz
ice-3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11.zip
Fixed ICE-7328 - IceGrid no longer returns proxies from disabled servers for ByType operations
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.cpp')
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index 03b4332f43b..bafafa42553 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -18,6 +18,7 @@
#include <IceGrid/AllocatableObjectCache.h>
#include <IceGrid/SessionI.h>
#include <IceGrid/DescriptorHelper.h>
+#include <IceGrid/Topics.h>
using namespace std;
using namespace IceGrid;
@@ -263,6 +264,12 @@ ServerCache::clear(const string& id)
}
void
+ServerCache::setNodeObserverTopic(const NodeObserverTopicPtr& nodeObserverTopic)
+{
+ _nodeObserverTopic = nodeObserverTopic;
+}
+
+void
ServerCache::addCommunicator(const CommunicatorDescriptorPtr& oldDesc,
const CommunicatorDescriptorPtr& newDesc,
const ServerEntryPtr& server,
@@ -291,7 +298,7 @@ ServerCache::addCommunicator(const CommunicatorDescriptorPtr& oldDesc,
for(ObjectDescriptorSeq::const_iterator r = q->objects.begin(); r != q->objects.end(); ++r)
{
- _objectCache.add(toObjectInfo(_communicator, *r, q->id), application);
+ _objectCache.add(toObjectInfo(_communicator, *r, q->id), application, server->getId());
}
for(ObjectDescriptorSeq::const_iterator r = q->allocatables.begin(); r != q->allocatables.end(); ++r)
{
@@ -1091,6 +1098,12 @@ ServerEntry::checkUpdate(const ServerInfo& info, bool noRestart)
return new CheckUpdateResult(_id, oldInfo.node, noRestart, desc, server->begin_checkUpdate(desc, noRestart));
}
+bool
+ServerEntry::isEnabled() const
+{
+ return _cache.getNodeObserverTopic()->isServerEnabled(_id);
+}
+
void
ServerEntry::allocated(const SessionIPtr& session)
{