summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AllocatableObjectCache.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/AllocatableObjectCache.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/AllocatableObjectCache.h')
-rw-r--r--cpp/src/IceGrid/AllocatableObjectCache.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/AllocatableObjectCache.h b/cpp/src/IceGrid/AllocatableObjectCache.h
index 382810c3653..9f2db6f3121 100644
--- a/cpp/src/IceGrid/AllocatableObjectCache.h
+++ b/cpp/src/IceGrid/AllocatableObjectCache.h
@@ -19,18 +19,22 @@
namespace IceGrid
{
+class ServerEntry;
+typedef IceUtil::Handle<ServerEntry> ServerEntryPtr;
+
class AllocatableObjectCache;
class AllocatableObjectEntry : public Allocatable
{
public:
- AllocatableObjectEntry(AllocatableObjectCache&, const ObjectInfo&, const AllocatablePtr&);
+ AllocatableObjectEntry(AllocatableObjectCache&, const ObjectInfo&, const ServerEntryPtr&);
Ice::ObjectPrx getProxy() const;
std::string getType() const;
bool canRemove();
+ virtual bool isEnabled() const;
virtual void allocated(const SessionIPtr&);
virtual void released(const SessionIPtr&);
virtual bool canTryAllocate();
@@ -42,6 +46,7 @@ private:
AllocatableObjectCache& _cache;
const ObjectInfo _info;
+ ServerEntryPtr _server;
bool _destroyed;
};
typedef IceUtil::Handle<AllocatableObjectEntry> AllocatableObjectEntryPtr;
@@ -77,7 +82,7 @@ public:
AllocatableObjectCache(const Ice::CommunicatorPtr&);
- void add(const ObjectInfo&, const AllocatablePtr&);
+ void add(const ObjectInfo&, const ServerEntryPtr&);
AllocatableObjectEntryPtr get(const Ice::Identity&) const;
void remove(const Ice::Identity&);