summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-02-07 11:40:02 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-02-07 11:40:02 +0100
commit88f147494f7bc861d7792be4785cb6cfc1c53c3c (patch)
tree986b58ab9afbf9effade35602656a3c56b0486d4 /cpp/src
parentFix ICE-7561 - PHP Build failure (diff)
downloadice-88f147494f7bc861d7792be4785cb6cfc1c53c3c.tar.bz2
ice-88f147494f7bc861d7792be4785cb6cfc1c53c3c.tar.xz
ice-88f147494f7bc861d7792be4785cb6cfc1c53c3c.zip
Removed unused methods
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp124
-rw-r--r--cpp/src/Ice/LocatorInfo.h13
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp2
-rw-r--r--cpp/src/Ice/Reference.cpp2
-rw-r--r--cpp/src/Ice/RouterInfo.cpp24
-rw-r--r--cpp/src/Ice/RouterInfo.h1
6 files changed, 12 insertions, 154 deletions
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index 181382909f2..0871c59377e 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -371,7 +371,7 @@ IceInternal::LocatorInfo::RequestCallback::response(const LocatorInfoPtr& locato
// by the locator is an indirect proxy. We now need to resolve the endpoints
// of this indirect proxy.
//
- locatorInfo->getEndpointsWithCallback(r, _ref, _ttl, _callback);
+ locatorInfo->getEndpoints(r, _ref, _ttl, _callback);
return;
}
}
@@ -446,66 +446,6 @@ IceInternal::LocatorInfo::Request::addCallback(const ReferencePtr& ref,
}
}
-vector<EndpointIPtr>
-IceInternal::LocatorInfo::Request::getEndpoints(const ReferencePtr& ref,
- const ReferencePtr& wellKnownRef,
- int ttl,
- bool& cached)
-{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
- if(!_response && !_exception)
- {
- if(wellKnownRef) // This request is to resolve the endpoints of a cached well-known object reference
- {
- _wellKnownRefs.push_back(wellKnownRef);
- }
- if(!_sent)
- {
- _sent = true;
- sync.release();
- send(); // send() might call exception() from this thread so we need to release the mutex.
- sync.acquire();
- }
-
- while(!_response && !_exception)
- {
- _monitor.wait();
- }
- }
-
- if(_exception)
- {
- _locatorInfo->getEndpointsException(ref, *_exception); // This throws.
- }
-
- assert(_response);
- vector<EndpointIPtr> endpoints;
- if(_proxy)
- {
- ReferencePtr r = _proxy->_getReference();
- if(!r->isIndirect())
- {
- endpoints = r->getEndpoints();
- }
- else if(ref->isWellKnown() && !r->isWellKnown())
- {
- //
- // We're resolving the endpoints of a well-known object and the proxy returned
- // by the locator is an indirect proxy. We now need to resolve the endpoints
- // of this indirect proxy.
- //
- return _locatorInfo->getEndpoints(r, ref, ttl, cached);
- }
- }
-
- cached = false;
- if(_ref->getInstance()->traceLevels()->location >= 1)
- {
- _locatorInfo->getEndpointsTrace(ref, endpoints, false);
- }
- return endpoints;
-}
-
IceInternal::LocatorInfo::Request::Request(const LocatorInfoPtr& locatorInfo, const ReferencePtr& ref) :
_locatorInfo(locatorInfo), _ref(ref), _sent(false), _response(false)
{
@@ -606,64 +546,12 @@ IceInternal::LocatorInfo::getLocatorRegistry()
}
}
-vector<EndpointIPtr>
-IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref, const ReferencePtr& wellKnownRef, int ttl, bool& cached)
-{
- assert(ref->isIndirect());
- vector<EndpointIPtr> endpoints;
- if(!ref->isWellKnown())
- {
- if(!_table->getAdapterEndpoints(ref->getAdapterId(), ttl, endpoints))
- {
- if(_background && !endpoints.empty())
- {
- getAdapterRequest(ref)->addCallback(ref, wellKnownRef, ttl, 0);
- }
- else
- {
- return getAdapterRequest(ref)->getEndpoints(ref, wellKnownRef, ttl, cached);
- }
- }
- }
- else
- {
- ReferencePtr r;
- if(!_table->getObjectReference(ref->getIdentity(), ttl, r))
- {
- if(_background && r)
- {
- getObjectRequest(ref)->addCallback(ref, 0, ttl, 0);
- }
- else
- {
- return getObjectRequest(ref)->getEndpoints(ref, 0, ttl, cached);
- }
- }
-
- if(!r->isIndirect())
- {
- endpoints = r->getEndpoints();
- }
- else if(!r->isWellKnown())
- {
- return getEndpoints(r, ref, ttl, cached);
- }
- }
-
- assert(!endpoints.empty());
- cached = true;
- if(ref->getInstance()->traceLevels()->location >= 1)
- {
- getEndpointsTrace(ref, endpoints, true);
- }
- return endpoints;
-}
void
-IceInternal::LocatorInfo::getEndpointsWithCallback(const ReferencePtr& ref,
- const ReferencePtr& wellKnownRef,
- int ttl,
- const GetEndpointsCallbackPtr& callback)
+IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref,
+ const ReferencePtr& wellKnownRef,
+ int ttl,
+ const GetEndpointsCallbackPtr& callback)
{
assert(ref->isIndirect());
vector<EndpointIPtr> endpoints;
@@ -704,7 +592,7 @@ IceInternal::LocatorInfo::getEndpointsWithCallback(const ReferencePtr& ref,
}
else if(!r->isWellKnown())
{
- getEndpointsWithCallback(r, ref, ttl, callback);
+ getEndpoints(r, ref, ttl, callback);
return;
}
}
diff --git a/cpp/src/Ice/LocatorInfo.h b/cpp/src/Ice/LocatorInfo.h
index 7809f211eb1..8bd1716790f 100644
--- a/cpp/src/Ice/LocatorInfo.h
+++ b/cpp/src/Ice/LocatorInfo.h
@@ -117,7 +117,6 @@ public:
public:
void addCallback(const ReferencePtr&, const ReferencePtr&, int, const GetEndpointsCallbackPtr&);
- std::vector<EndpointIPtr> getEndpoints(const ReferencePtr&, const ReferencePtr&, int, bool&);
void response(const Ice::ObjectPrxPtr&);
void exception(const Ice::Exception&);
@@ -159,17 +158,11 @@ public:
}
Ice::LocatorRegistryPrxPtr getLocatorRegistry();
- std::vector<EndpointIPtr> getEndpoints(const ReferencePtr& ref, int ttl, bool& cached)
+ void getEndpoints(const ReferencePtr& ref, int ttl, const GetEndpointsCallbackPtr& cb)
{
- return getEndpoints(ref, 0, ttl, cached);
+ getEndpoints(ref, 0, ttl, cb);
}
- std::vector<EndpointIPtr> getEndpoints(const ReferencePtr&, const ReferencePtr&, int, bool&);
-
- void getEndpointsWithCallback(const ReferencePtr& ref, int ttl, const GetEndpointsCallbackPtr& cb)
- {
- getEndpointsWithCallback(ref, 0, ttl, cb);
- }
- void getEndpointsWithCallback(const ReferencePtr&, const ReferencePtr&, int, const GetEndpointsCallbackPtr&);
+ void getEndpoints(const ReferencePtr&, const ReferencePtr&, int, const GetEndpointsCallbackPtr&);
void clearCache(const ReferencePtr&);
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index 34503ec961b..c3b169f6ce0 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -230,7 +230,7 @@ IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, co
// limit is reached.
//
interval = 0;
- }
+ }
else if(cnt > static_cast<int>(_retryIntervals.size()))
{
if(traceLevels->retry >= 1)
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index 31cd7631479..b222b506352 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -1676,7 +1676,7 @@ IceInternal::RoutableReference::getConnectionNoRouterInfo(const GetConnectionCal
if(_locatorInfo)
{
RoutableReference* self = const_cast<RoutableReference*>(this);
- _locatorInfo->getEndpointsWithCallback(self, _locatorCacheTimeout, new Callback(self, callback));
+ _locatorInfo->getEndpoints(self, _locatorCacheTimeout, new Callback(self, callback));
}
else
{
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index 3367a743077..a4723f59217 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -109,8 +109,7 @@ IceInternal::RouterManager::erase(const RouterPrxPtr& rtr)
return info;
}
-IceInternal::RouterInfo::RouterInfo(const RouterPrxPtr& router) :
- _router(router)
+IceInternal::RouterInfo::RouterInfo(const RouterPrxPtr& router) : _router(router)
{
assert(_router);
}
@@ -222,27 +221,6 @@ IceInternal::RouterInfo::getServerEndpoints()
}
void
-IceInternal::RouterInfo::addProxy(const ObjectPrxPtr& proxy)
-{
- assert(proxy); // Must not be called for null proxies.
-
- {
- IceUtil::Mutex::Lock sync(*this);
- if(_identities.find(proxy->ice_getIdentity()) != _identities.end())
- {
- //
- // Only add the proxy to the router if it's not already in our local map.
- //
- return;
- }
- }
-
- ObjectProxySeq proxies;
- proxies.push_back(proxy);
- addAndEvictProxies(proxy, _router->addProxies(proxies));
-}
-
-void
IceInternal::RouterInfo::addProxyResponse(const Ice::ObjectProxySeq& proxies, const AddProxyCookiePtr& cookie)
{
addAndEvictProxies(cookie->proxy(), proxies);
diff --git a/cpp/src/Ice/RouterInfo.h b/cpp/src/Ice/RouterInfo.h
index 76b70bb7bd5..f307bee2044 100644
--- a/cpp/src/Ice/RouterInfo.h
+++ b/cpp/src/Ice/RouterInfo.h
@@ -128,7 +128,6 @@ public:
void addProxyResponse(const Ice::ObjectProxySeq&, const AddProxyCookiePtr&);
void addProxyException(const Ice::Exception&, const AddProxyCookiePtr&);
- void addProxy(const Ice::ObjectPrxPtr&);
bool addProxy(const Ice::ObjectPrxPtr&, const AddProxyCallbackPtr&);
void setAdapter(const Ice::ObjectAdapterPtr&);