diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-04-15 09:41:21 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-04-15 09:41:21 +0200 |
commit | 54884a0b4c139118fc49498b6d6715d7d9ab718c (patch) | |
tree | 1f00091ad68543b3dc9828f27e32c0d9f7d072fe /cpp/src/IceGrid/QueryI.cpp | |
parent | VC11 fixes for PHP 5.5 (diff) | |
download | ice-54884a0b4c139118fc49498b6d6715d7d9ab718c.tar.bz2 ice-54884a0b4c139118fc49498b6d6715d7d9ab718c.tar.xz ice-54884a0b4c139118fc49498b6d6715d7d9ab718c.zip |
Added support for IceGrid custom load balancing
Diffstat (limited to 'cpp/src/IceGrid/QueryI.cpp')
-rw-r--r-- | cpp/src/IceGrid/QueryI.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/cpp/src/IceGrid/QueryI.cpp b/cpp/src/IceGrid/QueryI.cpp index 782e8669441..9b623a90ed5 100644 --- a/cpp/src/IceGrid/QueryI.cpp +++ b/cpp/src/IceGrid/QueryI.cpp @@ -39,26 +39,25 @@ QueryI::findObjectById(const Ice::Identity& id, const Ice::Current&) const } Ice::ObjectPrx -QueryI::findObjectByType(const string& type, const Ice::Current&) const +QueryI::findObjectByType(const string& type, const Ice::Current& current) const { - return _database->getObjectByType(type); + return _database->getObjectByType(type, current.con, current.ctx); } Ice::ObjectPrx -QueryI::findObjectByTypeOnLeastLoadedNode(const string& type, LoadSample sample, const Ice::Current&) const +QueryI::findObjectByTypeOnLeastLoadedNode(const string& type, LoadSample sample, const Ice::Current& current) const { - return _database->getObjectByTypeOnLeastLoadedNode(type, sample); + return _database->getObjectByTypeOnLeastLoadedNode(type, sample, current.con, current.ctx); } Ice::ObjectProxySeq -QueryI::findAllObjectsByType(const string& type, const Ice::Current&) const +QueryI::findAllObjectsByType(const string& type, const Ice::Current& current) const { - return _database->getObjectsByType(type); + return _database->getObjectsByType(type, current.con, current.ctx); } - Ice::ObjectProxySeq -QueryI::findAllReplicas(const Ice::ObjectPrx& proxy, const Ice::Current&) const +QueryI::findAllReplicas(const Ice::ObjectPrx& proxy, const Ice::Current& current) const { if(!proxy) { @@ -86,7 +85,7 @@ QueryI::findAllReplicas(const Ice::ObjectPrx& proxy, const Ice::Current&) const try { - AdapterInfoSeq infos = _database->getAdapterInfo(prx->ice_getAdapterId()); + AdapterInfoSeq infos = _database->getFilteredAdapterInfo(prx->ice_getAdapterId(), current.con, current.ctx); if(infos.empty() || infos[0].replicaGroupId != prx->ice_getAdapterId()) { // The adapter id doesn't refer to a replica group or the replica group is empty. |