Class StepDouble
java.lang.Object
io.micrometer.core.instrument.step.StepValue<java.lang.Double>
io.micrometer.core.instrument.step.StepDouble
public class StepDouble extends StepValue<java.lang.Double>
Subtly different from
com.netflix.spectator.impl.StepDouble
in that we want to be able
to increment BEFORE rolling over the interval.-
Constructor Summary
Constructors Constructor Description StepDouble(Clock clock, long stepMillis)
-
Method Summary
Modifier and Type Method Description java.util.concurrent.atomic.DoubleAdder
getCurrent()
protected java.lang.Double
noValue()
protected java.util.function.Supplier<java.lang.Double>
valueSupplier()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
StepDouble
-
-
Method Details
-
valueSupplier
protected java.util.function.Supplier<java.lang.Double> valueSupplier()- Specified by:
valueSupplier
in classStepValue<java.lang.Double>
-
noValue
protected java.lang.Double noValue()- Specified by:
noValue
in classStepValue<java.lang.Double>
- Returns:
- value that should be returned by
StepValue.poll()
if within the first step period or if the previous step didn't record a value.
-
getCurrent
public java.util.concurrent.atomic.DoubleAdder getCurrent()
-