Interface StatisticSupplier

All Known Subinterfaces:
AccumulatedTimerSupplier, CounterSupplier, GaugeSupplier, IntervalTimerSupplier
All Known Implementing Classes:
AbstractIntervalTimerSupplier, AccumulatedTimer, AccumulatedTimerSnapshot, BasicCounter, CounterSnapshot, GaugeSnapshot, IntervalTimer, IntervalTimerSnapshot

public interface StatisticSupplier
Abstract supplier of a runtime statistic. A StatisticSupplier may be live, in which case their returned values reflect the current state. In the case where they are live, repeated calls to the various methods may change from one call to the next. A StatisticSupplier may also be a snapshot, in which case they represent a point-in-time of some measured value. In the case of a snapshot, repeated calls to the same method should always produce the same value. In addition, snapshots are expected to be serializable.
  • Method Details

    • snapshot

      StatisticSupplier snapshot()
      Returns a snapshot of this statistic.
      Returns:
      a snapshot of this statistic.
    • getState

      StatisticState getState()
      Returns the current state of the supplier.
      Returns:
      the state of the supplier