summaryrefslogtreecommitdiff
path: root/java/src/Ice/AsyncResult.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-06-27 10:31:41 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-06-27 10:31:41 +0200
commita4f93259dc3494d98addf38e69b87eb557d432b3 (patch)
treed2b78bb5cea24e33dc1b46be22dba6167e96c9ed /java/src/Ice/AsyncResult.java
parentFix for ICE-5515 (ice_staticId on proxies) in Java, C#, Python, Ruby and PHP ... (diff)
downloadice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.bz2
ice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.xz
ice-a4f93259dc3494d98addf38e69b87eb557d432b3.zip
Better collocation optimization, fix for ICE-5489, ICE-5484
Diffstat (limited to 'java/src/Ice/AsyncResult.java')
-rw-r--r--java/src/Ice/AsyncResult.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/java/src/Ice/AsyncResult.java b/java/src/Ice/AsyncResult.java
index 029e191336f..bf636fa6872 100644
--- a/java/src/Ice/AsyncResult.java
+++ b/java/src/Ice/AsyncResult.java
@@ -243,7 +243,7 @@ public class AsyncResult
}
}
- public final void __invokeExceptionAsync(final LocalException ex)
+ public final void __invokeExceptionAsync(final Ice.Exception ex)
{
//
// This is called when it's not safe to call the exception callback synchronously
@@ -252,7 +252,7 @@ public class AsyncResult
//
try
{
- _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem(_instance)
+ _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem()
{
public void
run()
@@ -267,7 +267,7 @@ public class AsyncResult
}
}
- public final void __invokeException(LocalException ex)
+ public final void __invokeException(Ice.Exception ex)
{
synchronized(_monitor)
{
@@ -342,6 +342,19 @@ public class AsyncResult
}
}
+ public void __attachCollocatedObserver(int requestId)
+ {
+ if(_observer != null)
+ {
+ _remoteObserver = _observer.getCollocatedObserver(requestId,
+ _os.size() - IceInternal.Protocol.headerSize - 4);
+ if(_remoteObserver != null)
+ {
+ _remoteObserver.attach();
+ }
+ }
+ }
+
public Ice.Instrumentation.InvocationObserver __getObserver()
{
return _observer;
@@ -356,7 +369,7 @@ public class AsyncResult
//
try
{
- _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem(_instance)
+ _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem()
{
public void
run()
@@ -476,7 +489,7 @@ public class AsyncResult
{
final IceInternal.RequestHandler h = handler;
_instance.clientThreadPool().execute(
- new IceInternal.DispatchWorkItem(_instance)
+ new IceInternal.DispatchWorkItem()
{
public void
run()
@@ -519,7 +532,7 @@ public class AsyncResult
protected byte _state;
protected boolean _sentSynchronously;
- protected LocalException _exception;
+ protected Ice.Exception _exception;
protected Ice.Instrumentation.InvocationObserver _observer;
protected Ice.Instrumentation.RemoteObserver _remoteObserver;