Class StepValue<V>

java.lang.Object
io.micrometer.core.instrument.step.StepValue<V>
Direct Known Subclasses:
StepDouble, StepLong

public abstract class StepValue<V> extends Object
Tracks 'values' for periods (steps) of time. The previous step's value is obtained by calling poll().
Since:
1.4.0
  • Constructor Details

    • StepValue

      public StepValue(Clock clock, long stepMillis)
  • Method Details

    • valueSupplier

      protected abstract Supplier<V> valueSupplier()
    • noValue

      protected abstract V noValue()
      Returns:
      value that should be returned by poll() if within the first step period or if the previous step didn't record a value.
    • poll

      public V poll()
      Returns:
      The value for the last completed interval.