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
    • 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 the metric
        Parameters:
        metric - the request metric
        failure - the failure
      • reportRequestBegin

        default void reportRequestBegin​(M metric)
        Signal the beginning of the request attached to the metric
        Parameters:
        metric - the request/response metric
      • reportRequestEnd

        default void reportRequestEnd​(M metric)
        Signal the end of the request attached to the metric
        Parameters:
        metric - the request/response metric
      • reportResponseBegin

        default void reportResponseBegin​(M metric)
        Signal the beginning of the response attached to the metric
        Parameters:
        metric - the request/response metric
      • reportResponseEnd

        default void reportResponseEnd​(M metric)
        Signal the end of the response attached to the metric
        Parameters:
        metric - the request metric