Package io.vertx.core.net.endpoint
Class DefaultInteractionMetrics
- java.lang.Object
-
- io.vertx.core.net.endpoint.DefaultInteractionMetrics
-
- All Implemented Interfaces:
InteractionMetrics<DefaultInteractionMetric>
public class DefaultInteractionMetrics extends Object implements InteractionMetrics<DefaultInteractionMetric>
Default interaction metrics.
-
-
Field Summary
-
Fields inherited from interface io.vertx.core.net.endpoint.InteractionMetrics
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description DefaultInteractionMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultInteractionMetric
initiateRequest()
Initiate a requestint
maxResponseTime()
int
minResponseTime()
int
numberOfFailures()
int
numberOfInflightRequests()
int
numberOfRequests()
void
reportFailure(DefaultInteractionMetric metric, Throwable failure)
Signal the failure of a request/response to themetric
void
reportRequestBegin(DefaultInteractionMetric metric)
Signal the beginning of the request attached to themetric
void
reportRequestEnd(DefaultInteractionMetric metric)
Signal the end of the request attached to themetric
void
reportResponseBegin(DefaultInteractionMetric metric)
Signal the beginning of the response attached to themetric
void
reportResponseEnd(DefaultInteractionMetric metric)
Signal the end of the response attached to themetric
-
-
-
Method Detail
-
initiateRequest
public DefaultInteractionMetric initiateRequest()
Description copied from interface:InteractionMetrics
Initiate a request- Specified by:
initiateRequest
in interfaceInteractionMetrics<DefaultInteractionMetric>
- Returns:
- the request metric
-
reportFailure
public void reportFailure(DefaultInteractionMetric metric, Throwable failure)
Description copied from interface:InteractionMetrics
Signal the failure of a request/response to themetric
- Specified by:
reportFailure
in interfaceInteractionMetrics<DefaultInteractionMetric>
- Parameters:
metric
- the request metricfailure
- the failure
-
reportRequestBegin
public void reportRequestBegin(DefaultInteractionMetric metric)
Description copied from interface:InteractionMetrics
Signal the beginning of the request attached to themetric
- Specified by:
reportRequestBegin
in interfaceInteractionMetrics<DefaultInteractionMetric>
- Parameters:
metric
- the request/response metric
-
reportRequestEnd
public void reportRequestEnd(DefaultInteractionMetric metric)
Description copied from interface:InteractionMetrics
Signal the end of the request attached to themetric
- Specified by:
reportRequestEnd
in interfaceInteractionMetrics<DefaultInteractionMetric>
- Parameters:
metric
- the request/response metric
-
reportResponseBegin
public void reportResponseBegin(DefaultInteractionMetric metric)
Description copied from interface:InteractionMetrics
Signal the beginning of the response attached to themetric
- Specified by:
reportResponseBegin
in interfaceInteractionMetrics<DefaultInteractionMetric>
- Parameters:
metric
- the request/response metric
-
reportResponseEnd
public void reportResponseEnd(DefaultInteractionMetric metric)
Description copied from interface:InteractionMetrics
Signal the end of the response attached to themetric
- Specified by:
reportResponseEnd
in interfaceInteractionMetrics<DefaultInteractionMetric>
- Parameters:
metric
- the request metric
-
numberOfInflightRequests
public int numberOfInflightRequests()
- Returns:
- the number of inflight requests
-
numberOfRequests
public int numberOfRequests()
- Returns:
- the total number of requests
-
numberOfFailures
public int numberOfFailures()
- Returns:
- the total number of failures
-
minResponseTime
public int minResponseTime()
- Returns:
- the min response time
-
maxResponseTime
public int maxResponseTime()
- Returns:
- the max response time
-
-