diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-07-01 17:42:04 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-07-01 17:42:04 +0200 |
commit | 344a7fd6e0d716f81dc27495e97a7ad9c2ab07b8 (patch) | |
tree | bd06f4919e5a5827f60e2a536e43e47a4fbed6d2 /java/src/IceInternal/InvocationObserverI.java | |
parent | Fixed ICE-5569: IceStorm IceMX debug iterator assert (diff) | |
download | ice-344a7fd6e0d716f81dc27495e97a7ad9c2ab07b8.tar.bz2 ice-344a7fd6e0d716f81dc27495e97a7ad9c2ab07b8.tar.xz ice-344a7fd6e0d716f81dc27495e97a7ad9c2ab07b8.zip |
IceMX and Python support for the new collocation optimization
Diffstat (limited to 'java/src/IceInternal/InvocationObserverI.java')
-rw-r--r-- | java/src/IceInternal/InvocationObserverI.java | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/java/src/IceInternal/InvocationObserverI.java b/java/src/IceInternal/InvocationObserverI.java index 7997a22d9d0..6745c281ef8 100644 --- a/java/src/IceInternal/InvocationObserverI.java +++ b/java/src/IceInternal/InvocationObserverI.java @@ -114,7 +114,7 @@ public class InvocationObserverI private Ice.EndpointInfo _endpointInfo; }; - static public final class CollocatedInvocationHelper extends MetricsHelper<RemoteMetrics> + static public final class CollocatedInvocationHelper extends MetricsHelper<CollocatedMetrics> { static private final AttributeResolver _attributes = new AttributeResolver() { @@ -134,15 +134,16 @@ public class InvocationObserverI } }; - CollocatedInvocationHelper(int requestId, int size) + CollocatedInvocationHelper(Ice.ObjectAdapter adapter, int requestId, int size) { super(_attributes); + _id = adapter.getName(); _requestId = requestId; _size = size; } public void - initMetrics(RemoteMetrics v) + initMetrics(CollocatedMetrics v) { v.size += _size; } @@ -150,10 +151,6 @@ public class InvocationObserverI public String getId() { - if(_id == null) - { - _id = Integer.toString(_requestId); - } return _id; } @@ -171,7 +168,7 @@ public class InvocationObserverI final private int _requestId; final private int _size; - private String _id; + final private String _id; }; public void @@ -209,19 +206,20 @@ public class InvocationObserverI delegate); } - public Ice.Instrumentation.RemoteObserver - getCollocatedObserver(int requestId, int sz) + public Ice.Instrumentation.CollocatedObserver + getCollocatedObserver(Ice.ObjectAdapter adapter, int requestId, int sz) { - Ice.Instrumentation.RemoteObserver delegate = null; + Ice.Instrumentation.CollocatedObserver delegate = null; if(_delegate != null) { - delegate = _delegate.getCollocatedObserver(requestId, sz); + delegate = _delegate.getCollocatedObserver(adapter, requestId, sz); } - return (Ice.Instrumentation.RemoteObserver)getObserver("Collocated", - new CollocatedInvocationHelper(requestId, sz), - RemoteMetrics.class, - RemoteObserverI.class, - delegate); + return (Ice.Instrumentation.CollocatedObserver)getObserver( + "Collocated", + new CollocatedInvocationHelper(adapter, requestId, sz), + CollocatedMetrics.class, + CollocatedObserverI.class, + delegate); } final MetricsUpdate<InvocationMetrics> _incrementRetry = new MetricsUpdate<InvocationMetrics>() |