diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-08-07 14:36:07 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-08-07 14:36:07 -0230 |
commit | b36ae21c88735cbd2c39c5ccde2572a8fcc4e928 (patch) | |
tree | dfd5eee6e7d61a9c6efcbaabe916639009aaa9af /java/src/IceInternal/LocatorInfo.java | |
parent | Add @Override where possible, and remove trailing white space. (diff) | |
download | ice-b36ae21c88735cbd2c39c5ccde2572a8fcc4e928.tar.bz2 ice-b36ae21c88735cbd2c39c5ccde2572a8fcc4e928.tar.xz ice-b36ae21c88735cbd2c39c5ccde2572a8fcc4e928.zip |
ICE-1593 Handling thread interrupts in Java
- Added Ice.BackgroundIO property to perform all IO in a non-user
thread. This makes Ice for Java interrupt safe. This is implemented
by the QueueRequestHanbler.
- EndpointHostResolver now uses an executor instead of a thread.
- Added java/demo/Ice/interrupt and java/test/Ice/interrupt.
- Made several changes that must be ported to C++ & C#.
- InvocationTimeout exceptions can hang forever.
- Connection establishment is always asynchronous.
- RequestHandler.requestTimeout and asyncRequestTimeout have been
renamed to requestCancel and asyncRequestCancel.
Diffstat (limited to 'java/src/IceInternal/LocatorInfo.java')
-rw-r--r-- | java/src/IceInternal/LocatorInfo.java | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/java/src/IceInternal/LocatorInfo.java b/java/src/IceInternal/LocatorInfo.java index 5afb2a3170a..7f043465c71 100644 --- a/java/src/IceInternal/LocatorInfo.java +++ b/java/src/IceInternal/LocatorInfo.java @@ -117,66 +117,6 @@ public final class LocatorInfo } } - synchronized EndpointI[] - getEndpoints(Reference ref, Reference wellKnownRef, int ttl, Ice.BooleanHolder cached) - { - if(!_response || _exception == null) - { - if(wellKnownRef != null) // This request is to resolve the endpoints of a cached well-known object ref - { - _wellKnownRefs.add(wellKnownRef); - } - if(!_sent) - { - _sent = true; - send(); - } - - while(!_response && _exception == null) - { - try - { - wait(); - } - catch(java.lang.InterruptedException ex) - { - } - } - } - - if(_exception != null) - { - _locatorInfo.getEndpointsException(ref, _exception); // This throws. - } - - assert(_response); - EndpointI[] endpoints = null; - if(_proxy != null) - { - Reference r = ((Ice.ObjectPrxHelperBase)_proxy).__reference(); - 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.value = false; - if(_ref.getInstance().traceLevels().location >= 1) - { - _locatorInfo.getEndpointsTrace(ref, endpoints, false); - } - return endpoints == null ? new EndpointI[0] : endpoints; - } - Request(LocatorInfo locatorInfo, Reference ref) { _locatorInfo = locatorInfo; @@ -397,67 +337,6 @@ public final class LocatorInfo } } - public EndpointI[] - getEndpoints(Reference ref, int ttl, Ice.BooleanHolder cached) - { - return getEndpoints(ref, null, ttl, cached); - } - - public EndpointI[] - getEndpoints(Reference ref, Reference wellKnownRef, int ttl, Ice.BooleanHolder cached) - { - assert(ref.isIndirect()); - EndpointI[] endpoints = null; - cached.value = false; - if(!ref.isWellKnown()) - { - endpoints = _table.getAdapterEndpoints(ref.getAdapterId(), ttl, cached); - if(!cached.value) - { - if(_background && endpoints != null) - { - getAdapterRequest(ref).addCallback(ref, wellKnownRef, ttl, null); - } - else - { - return getAdapterRequest(ref).getEndpoints(ref, wellKnownRef, ttl, cached); - } - } - } - else - { - Reference r = _table.getObjectReference(ref.getIdentity(), ttl, cached); - if(!cached.value) - { - if(_background && r != null) - { - getObjectRequest(ref).addCallback(ref, null, ttl, null); - } - else - { - return getObjectRequest(ref).getEndpoints(ref, null, ttl, cached); - } - } - - if(!r.isIndirect()) - { - endpoints = r.getEndpoints(); - } - else if(!r.isWellKnown()) - { - return getEndpoints(r, ref, ttl, cached); - } - } - - assert(endpoints != null); - cached.value = true; - if(ref.getInstance().traceLevels().location >= 1) - { - getEndpointsTrace(ref, endpoints, true); - } - return endpoints; - } - public void getEndpoints(Reference ref, int ttl, GetEndpointsCallback callback) { |