Package io.dropwizard.metrics5
Interface Reservoir
-
- All Known Implementing Classes:
ExponentiallyDecayingReservoir,LockFreeExponentiallyDecayingReservoir,SlidingTimeWindowArrayReservoir,SlidingTimeWindowReservoir,SlidingWindowReservoir,UniformReservoir
public interface ReservoirA statistically representative reservoir of a data stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SnapshotgetSnapshot()Returns a snapshot of the reservoir's values.intsize()Returns the number of values recorded.voidupdate(long value)Adds a new recorded value to the reservoir.
-
-
-
Method Detail
-
size
int size()
Returns the number of values recorded.- Returns:
- the number of values recorded
-
update
void update(long value)
Adds a new recorded value to the reservoir.- Parameters:
value- a new recorded value
-
getSnapshot
Snapshot getSnapshot()
Returns a snapshot of the reservoir's values.- Returns:
- a snapshot of the reservoir's values
-
-