summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ObjectCache.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-04-24 09:46:12 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-04-24 09:46:12 +0000
commita5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1 (patch)
treea2f26b3e3207ac925239385101f18a5459da1664 /cpp/src/IceGrid/ObjectCache.cpp
parentUnix Fix. (diff)
downloadice-a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1.tar.bz2
ice-a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1.tar.xz
ice-a5fdbf7412b96cecd45314f9d9eb37aaf77a2bf1.zip
Added first cut of the allocation mechanism.
Diffstat (limited to 'cpp/src/IceGrid/ObjectCache.cpp')
-rw-r--r--cpp/src/IceGrid/ObjectCache.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/ObjectCache.cpp b/cpp/src/IceGrid/ObjectCache.cpp
index a14e2b46928..d8d89d8583f 100644
--- a/cpp/src/IceGrid/ObjectCache.cpp
+++ b/cpp/src/IceGrid/ObjectCache.cpp
@@ -33,6 +33,7 @@ ObjectCache::add(const string& app, const string& adapterId, const string& endpo
ObjectInfo info;
info.type = desc.type;
+ info.allocatable = desc.allocatable;
if(adapterId.empty())
{
info.proxy = _communicator->stringToProxy(Ice::identityToString(desc.id) + ":" + endpoints);
@@ -106,7 +107,11 @@ ObjectCache::getObjectsByType(const string& type)
}
for(set<Ice::Identity>::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
{
- proxies.push_back(getImpl(*q)->getProxy());
+ ObjectEntryPtr entry = getImpl(*q);
+ if(!entry->allocatable())
+ {
+ proxies.push_back(entry->getProxy());
+ }
}
return proxies;
}
@@ -126,7 +131,8 @@ ObjectCache::getAll(const string& expression)
return infos;
}
-ObjectEntry::ObjectEntry(Cache<Ice::Identity, ObjectEntry>&, const Ice::Identity&)
+ObjectEntry::ObjectEntry(Cache<Ice::Identity, ObjectEntry>&, const Ice::Identity&) :
+ Allocatable(false)
{
}
@@ -135,6 +141,7 @@ ObjectEntry::set(const string& app, const ObjectInfo& info)
{
_application = app;
_info = info;
+ _allocatable = info.allocatable;
}
Ice::ObjectPrx