Class InflightRequestCollector
- java.lang.Object
-
- io.smallrye.stork.loadbalancer.requests.InflightRequestCollector
-
- All Implemented Interfaces:
CallStatisticsCollector
public class InflightRequestCollector extends Object implements CallStatisticsCollector
CallStatisticsCollectorthat keep tracks of the number of inflight requests.
-
-
Constructor Summary
Constructors Constructor Description InflightRequestCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intget(long id)Gets the number of inflight requests for the service instance with the givenid.voidrecordEnd(long serviceInstanceId, Throwable throwable)voidrecordStart(long serviceInstanceId, boolean measureTime)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.smallrye.stork.spi.CallStatisticsCollector
recordReply
-
-
-
-
Method Detail
-
get
public int get(long id)
Gets the number of inflight requests for the service instance with the givenid.- Parameters:
id- the service instance id- Returns:
- the number of inflight request,
0if none.
-
recordStart
public void recordStart(long serviceInstanceId, boolean measureTime)- Specified by:
recordStartin interfaceCallStatisticsCollector
-
recordEnd
public void recordEnd(long serviceInstanceId, Throwable throwable)- Specified by:
recordEndin interfaceCallStatisticsCollector
-
-