summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/NodeCache.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-08-23 15:44:31 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-08-23 15:44:31 +0000
commit725d1f86adc4e2129c75c7b24e7fa1000c0d18c3 (patch)
tree570c1bd999daede2f08f334225a84458329eab7f /cpp/src/IceGrid/NodeCache.cpp
parentAdded more tracing (diff)
downloadice-725d1f86adc4e2129c75c7b24e7fa1000c0d18c3.tar.bz2
ice-725d1f86adc4e2129c75c7b24e7fa1000c0d18c3.tar.xz
ice-725d1f86adc4e2129c75c7b24e7fa1000c0d18c3.zip
More replication work.
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r--cpp/src/IceGrid/NodeCache.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp
index 1da1ed0aa8f..cc99eb4c07c 100644
--- a/cpp/src/IceGrid/NodeCache.cpp
+++ b/cpp/src/IceGrid/NodeCache.cpp
@@ -8,6 +8,8 @@
// **********************************************************************
#include <IceUtil/Functional.h>
+#include <Ice/Communicator.h>
+#include <Ice/Properties.h>
#include <Ice/LoggerUtil.h>
#include <IceGrid/NodeCache.h>
#include <IceGrid/SessionI.h>
@@ -155,8 +157,9 @@ private:
};
-NodeCache::NodeCache(const Ice::CommunicatorPtr& communicator, ReplicaCache& replicaCache) :
+NodeCache::NodeCache(const Ice::CommunicatorPtr& communicator, ReplicaCache& replicaCache, bool master) :
_communicator(communicator),
+ _master(master),
_replicaCache(replicaCache)
{
}
@@ -399,7 +402,7 @@ NodeEntry::canRemove()
}
void
-NodeEntry::loadServer(const ServerEntryPtr& entry, const ServerInfo& server, const SessionIPtr& session, int revision)
+NodeEntry::loadServer(const ServerEntryPtr& entry, const ServerInfo& server, const SessionIPtr& session)
{
try
{
@@ -445,8 +448,10 @@ NodeEntry::loadServer(const ServerEntryPtr& entry, const ServerInfo& server, con
}
AMI_Node_loadServerPtr amiCB = new LoadCB(_cache.getTraceLevels(), entry, entry->getId(), _name);
- string sessionId = session ? session->getId() : string("");
- node->loadServer_async(amiCB, server.application, desc, sessionId);
+
+ ServerInfo info = server;
+ info.descriptor = desc;
+ node->loadServer_async(amiCB, info, _cache.isMaster());
}
catch(const NodeUnreachableException& ex)
{