diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-05-23 12:23:55 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-05-23 12:23:55 +0000 |
commit | 029fd83551338ea01613c54ddbc4906c09227c60 (patch) | |
tree | df5e77cbb88f29def748393baf98d88d172cb7ba /cpp/src/IceGrid/ObjectCache.cpp | |
parent | fix test for recent slice change (diff) | |
download | ice-029fd83551338ea01613c54ddbc4906c09227c60.tar.bz2 ice-029fd83551338ea01613c54ddbc4906c09227c60.tar.xz ice-029fd83551338ea01613c54ddbc4906c09227c60.zip |
Added support for Glacier2 filters.
Diffstat (limited to 'cpp/src/IceGrid/ObjectCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/ObjectCache.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/ObjectCache.cpp b/cpp/src/IceGrid/ObjectCache.cpp index d1eb882e2ef..95f98c99742 100644 --- a/cpp/src/IceGrid/ObjectCache.cpp +++ b/cpp/src/IceGrid/ObjectCache.cpp @@ -10,6 +10,7 @@ #include <IceUtil/Random.h> #include <Ice/Communicator.h> #include <Ice/LoggerUtil.h> +#include <Ice/LocalException.h> #include <IceGrid/ObjectCache.h> #include <IceGrid/NodeSessionI.h> #include <IceGrid/ServerCache.h> @@ -365,6 +366,20 @@ ObjectEntry::allocated(const SessionIPtr& session) out << "object `" << _cache.communicator()->identityToString(id) << "' allocated by `" << session->getId() << "' (" << _count << ")"; } + + Glacier2::SessionControlPrx ctl = session->getSessionControl(); + if(ctl) + { + try + { + Ice::IdentitySeq seq(1); + seq.push_back(_info.proxy->ice_getIdentity()); + ctl->objectIdFilter()->addAccept(seq); + } + catch(const Ice::ObjectNotExistException&) + { + } + } } void @@ -375,6 +390,20 @@ ObjectEntry::released(const SessionIPtr& session) // session->removeAllocation(this); + Glacier2::SessionControlPrx ctl = session->getSessionControl(); + if(ctl) + { + try + { + Ice::IdentitySeq seq(1); + seq.push_back(_info.proxy->ice_getIdentity()); + ctl->objectIdFilter()->removeAccept(seq); + } + catch(const Ice::ObjectNotExistException&) + { + } + } + TraceLevelsPtr traceLevels = _cache.getTraceLevels(); if(traceLevels && traceLevels->object > 1) { |