summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ObjectCache.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-02-10 18:42:18 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-02-10 18:42:18 +0100
commit3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11 (patch)
tree8a2475dda8b95d5b837bdf5415a1a968c57642c1 /cpp/src/IceGrid/ObjectCache.h
parentFix (ICE-7331) - IceGridGUI preference preservation (diff)
downloadice-3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11.tar.bz2
ice-3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11.tar.xz
ice-3b2960e7be53c931ffcf84a0a2fe3ca1e2b75e11.zip
Fixed ICE-7328 - IceGrid no longer returns proxies from disabled servers for ByType operations
Diffstat (limited to 'cpp/src/IceGrid/ObjectCache.h')
-rw-r--r--cpp/src/IceGrid/ObjectCache.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/ObjectCache.h b/cpp/src/IceGrid/ObjectCache.h
index fba99917e1b..fbeb5aeb9f4 100644
--- a/cpp/src/IceGrid/ObjectCache.h
+++ b/cpp/src/IceGrid/ObjectCache.h
@@ -23,11 +23,12 @@ class ObjectCache;
class ObjectEntry : public IceUtil::Shared
{
public:
-
- ObjectEntry(const ObjectInfo&, const std::string&);
+
+ ObjectEntry(const ObjectInfo&, const std::string&, const std::string&);
Ice::ObjectPrx getProxy() const;
std::string getType() const;
std::string getApplication() const;
+ std::string getServer() const;
const ObjectInfo& getObjectInfo() const;
bool canRemove();
@@ -36,6 +37,7 @@ private:
const ObjectInfo _info;
const std::string _application;
+ const std::string _server;
};
typedef IceUtil::Handle<ObjectEntry> ObjectEntryPtr;
@@ -45,18 +47,19 @@ public:
ObjectCache(const Ice::CommunicatorPtr&);
- void add(const ObjectInfo&, const std::string&);
+ void add(const ObjectInfo&, const std::string&, const std::string&);
ObjectEntryPtr get(const Ice::Identity&) const;
void remove(const Ice::Identity&);
- Ice::ObjectProxySeq getObjectsByType(const std::string&);
+ std::vector<ObjectEntryPtr> getObjectsByType(const std::string&);
+
ObjectInfoSeq getAll(const std::string&);
ObjectInfoSeq getAllByType(const std::string&);
const Ice::CommunicatorPtr& getCommunicator() const { return _communicator; }
private:
-
+
class TypeEntry
{
public:
@@ -65,11 +68,11 @@ private:
void add(const ObjectEntryPtr&);
bool remove(const ObjectEntryPtr&);
-
+
const std::vector<ObjectEntryPtr>& getObjects() const { return _objects; }
private:
-
+
std::vector<ObjectEntryPtr> _objects;
};