Class TimerImpl

java.lang.Object
io.github.resilience4j.metrics.internal.TimerImpl
All Implemented Interfaces:
Timer

public class TimerImpl extends Object implements Timer
  • Field Details

    • SUCCESSFUL

      public static final String SUCCESSFUL
      See Also:
    • TOTAL

      public static final String TOTAL
      See Also:
    • FAILED

      public static final String FAILED
      See Also:
    • timerName

      private final String timerName
    • metricRegistry

      private final com.codahale.metrics.MetricRegistry metricRegistry
    • metrics

      private final TimerImpl.TimerMetrics metrics
    • successfulCallsTimer

      private com.codahale.metrics.Timer successfulCallsTimer
    • totalCallsCounter

      private com.codahale.metrics.Counter totalCallsCounter
    • failedCallsCounter

      private com.codahale.metrics.Counter failedCallsCounter
  • Constructor Details

    • TimerImpl

      public TimerImpl(String timerName, com.codahale.metrics.MetricRegistry metricRegistry)
  • Method Details

    • context

      public Timer.Context context()
      Description copied from interface: Timer
      Creates a Timer context and starts the timer
      Specified by:
      context in interface Timer
      Returns:
      the Timer context
    • getName

      public String getName()
      Description copied from interface: Timer
      Returns the name of this Timer.
      Specified by:
      getName in interface Timer
      Returns:
      the name of this Timer
    • getMetricRegistry

      public com.codahale.metrics.MetricRegistry getMetricRegistry()
      Description copied from interface: Timer
      Returns the MetricRegistry of this Timer.
      Specified by:
      getMetricRegistry in interface Timer
      Returns:
      the MetricRegistry of this Timer
    • getMetrics

      public Timer.Metrics getMetrics()
      Description copied from interface: Timer
      Returns the Metrics of this Timer.
      Specified by:
      getMetrics in interface Timer
      Returns:
      the Metrics of this Timer