Class StepValue<V>
java.lang.Object
io.micrometer.core.instrument.step.StepValue<V>
- Direct Known Subclasses:
StepBucketHistogram
,StepDouble
,StepLong
Tracks 'values' for periods (steps) of time. The previous step's value is obtained by
calling
poll()
.- Since:
- 1.4.0
-
Constructor Details
-
StepValue
-
StepValue
Creates aStepValue
instance.- Parameters:
clock
- clockstepMillis
- step in millisecondsinitValue
- initial value- Since:
- 1.11.0
-
-
Method Details
-
valueSupplier
-
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
- Returns:
- The value for the last completed interval.
-
_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
-