Package io.vertx.core.net.endpoint
Interface InteractionMetrics<M>
-
- All Known Implementing Classes:
DefaultInteractionMetrics
@Unstable public interface InteractionMetrics<M>
Gather metrics for a request/response interaction with the server, this interface is write-only and used to report usage to build statistics for a load balancing purpose.- Author:
- Julien Viet
-
-
Field Summary
Fields Modifier and Type Field Description static InteractionMetrics<?>
INSTANCE
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default M
initiateRequest()
Initiate a requestdefault void
reportFailure(M metric, Throwable failure)
Signal the failure of a request/response to themetric
default void
reportRequestBegin(M metric)
Signal the beginning of the request attached to themetric
default void
reportRequestEnd(M metric)
Signal the end of the request attached to themetric
default void
reportResponseBegin(M metric)
Signal the beginning of the response attached to themetric
default void
reportResponseEnd(M metric)
Signal the end of the response attached to themetric
-
-
-
Field Detail
-
INSTANCE
static final InteractionMetrics<?> INSTANCE
-
-
Method Detail
-
initiateRequest
default M initiateRequest()
Initiate a request- Returns:
- the request metric
-
reportFailure
default void reportFailure(M metric, Throwable failure)
Signal the failure of a request/response to themetric
- Parameters:
metric
- the request metricfailure
- the failure
-
reportRequestBegin
default void reportRequestBegin(M metric)
Signal the beginning of the request attached to themetric
- Parameters:
metric
- the request/response metric
-
reportRequestEnd
default void reportRequestEnd(M metric)
Signal the end of the request attached to themetric
- Parameters:
metric
- the request/response metric
-
reportResponseBegin
default void reportResponseBegin(M metric)
Signal the beginning of the response attached to themetric
- Parameters:
metric
- the request/response metric
-
reportResponseEnd
default void reportResponseEnd(M metric)
Signal the end of the response attached to themetric
- Parameters:
metric
- the request metric
-
-