From 029fd83551338ea01613c54ddbc4906c09227c60 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Tue, 23 May 2006 12:23:55 +0000 Subject: Added support for Glacier2 filters. --- cpp/src/IceGrid/ObjectCache.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'cpp/src/IceGrid/ObjectCache.cpp') 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 #include #include +#include #include #include #include @@ -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) { -- cgit v1.2.3