Class StepTuple2<T1,T2>

java.lang.Object
io.micrometer.core.instrument.step.StepTuple2<T1,T2>

public class StepTuple2<T1,T2> extends Object
Tracks multiple 'values' for periods (steps) of time. The previous step's values are obtained by calling poll1() or poll2().
Since:
1.5.1
  • Constructor Details

    • StepTuple2

      public StepTuple2(Clock clock, long stepMillis, T1 t1NoValue, T2 t2NoValue, Supplier<T1> t1Supplier, Supplier<T2> t2Supplier)
  • Method Details

    • _closingRollover

      protected void _closingRollover()
      This is an internal method not meant for general use.

      Rolls the values regardless of the clock or current time and ensures the value will never roll over again after.

      Since:
      1.11.0
    • poll1

      public T1 poll1()
      Returns:
      The value for the last completed interval.
    • poll2

      public T2 poll2()
      Returns:
      The value for the last completed interval.