Class SlidingTimeWindowReservoir
java.lang.Object
org.axonframework.extension.metrics.micrometer.reservoir.SlidingTimeWindowReservoir
A reservoir of measurements constrained by a sliding window that stores only the measurements made
in the last
N seconds (or other time unit).
Adapted from com.codahale.metrics.SlidingTimeWindowReservoir from io.dropwizard.metrics:metrics-core:3.1.2
- Since:
- 4.1
- Author:
- Volker Fritzsch, Coda Hale, ceetav, Marijn van Zelst
-
Constructor Summary
ConstructorsConstructorDescriptionSlidingTimeWindowReservoir(long window, TimeUnit windowUnit, io.micrometer.core.instrument.Clock clock) Creates a newSlidingTimeWindowReservoirwith the given clock and window of time. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the measurementsvoidupdate(long value) Add new measurement value
-
Constructor Details
-
SlidingTimeWindowReservoir
public SlidingTimeWindowReservoir(long window, TimeUnit windowUnit, io.micrometer.core.instrument.Clock clock) Creates a newSlidingTimeWindowReservoirwith the given clock and window of time.- Parameters:
window- the window of timewindowUnit- the unit ofwindowclock- theClockto use
-
-
Method Details
-
update
public void update(long value) Add new measurement value- Parameters:
value- the measurement value
-
getMeasurements
Retrieve the measurements- Returns:
- the measurements
-