Class SlidingWindowReservoir
java.lang.Object
com.codahale.metrics.SlidingWindowReservoir
- All Implemented Interfaces:
Reservoir
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSlidingWindowReservoir(int size) Creates a newSlidingWindowReservoirwhich stores the lastsizemeasurements. -
Method Summary
-
Field Details
-
measurements
private final long[] measurements -
count
private long count
-
-
Constructor Details
-
SlidingWindowReservoir
public SlidingWindowReservoir(int size) Creates a newSlidingWindowReservoirwhich stores the lastsizemeasurements.- Parameters:
size- the number of measurements to store
-
-
Method Details
-
size
-
update
-
getSnapshot
Description copied from interface:ReservoirReturns a snapshot of the reservoir's values.- Specified by:
getSnapshotin interfaceReservoir- Returns:
- a snapshot of the reservoir's values
-