Interface CircuitBreaker.Metrics

Enclosing interface:
CircuitBreaker

public static interface CircuitBreaker.Metrics
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the current failure rate in percentage.
    int
    Returns the current total number of buffered calls in the ring buffer.
    int
    Returns the current number of failed buffered calls in the ring buffer.
    long
    Returns the current number of not permitted calls, when the state is OPEN.
    int
    Returns the current total number of calls which were slower than a certain threshold.
    int
    Returns the current number of failed calls which were slower than a certain threshold.
    int
    Returns the current number of successful calls which were slower than a certain threshold.
    int
    Returns the current number of successful buffered calls in the ring buffer.
    float
    Returns the current percentage of calls which were slower than a certain threshold.
  • Method Details

    • getFailureRate

      float getFailureRate()
      Returns the current failure rate in percentage. If the number of measured calls is below the minimum number of measured calls, it returns -1.
      Returns:
      the failure rate in percentage
    • getSlowCallRate

      float getSlowCallRate()
      Returns the current percentage of calls which were slower than a certain threshold. If the number of measured calls is below the minimum number of measured calls, it returns -1.
      Returns:
      the failure rate in percentage
    • getNumberOfSlowCalls

      int getNumberOfSlowCalls()
      Returns the current total number of calls which were slower than a certain threshold.
      Returns:
      the current total number of calls which were slower than a certain threshold
    • getNumberOfSlowSuccessfulCalls

      int getNumberOfSlowSuccessfulCalls()
      Returns the current number of successful calls which were slower than a certain threshold.
      Returns:
      the current number of successful calls which were slower than a certain threshold
    • getNumberOfSlowFailedCalls

      int getNumberOfSlowFailedCalls()
      Returns the current number of failed calls which were slower than a certain threshold.
      Returns:
      the current number of failed calls which were slower than a certain threshold
    • getNumberOfBufferedCalls

      int getNumberOfBufferedCalls()
      Returns the current total number of buffered calls in the ring buffer.
      Returns:
      he current total number of buffered calls in the ring buffer
    • getNumberOfFailedCalls

      int getNumberOfFailedCalls()
      Returns the current number of failed buffered calls in the ring buffer.
      Returns:
      the current number of failed buffered calls in the ring buffer
    • getNumberOfNotPermittedCalls

      long getNumberOfNotPermittedCalls()
      Returns the current number of not permitted calls, when the state is OPEN.

      The number of denied calls is always 0, when the CircuitBreaker state is CLOSED or HALF_OPEN. The number of denied calls is only increased when the CircuitBreaker state is OPEN.

      Returns:
      the current number of not permitted calls
    • getNumberOfSuccessfulCalls

      int getNumberOfSuccessfulCalls()
      Returns the current number of successful buffered calls in the ring buffer.
      Returns:
      the current number of successful buffered calls in the ring buffer