Constructor and Description |
---|
SlidingWindowReservoir(int size)
Creates a new
SlidingWindowReservoir which stores the last size measurements. |
Modifier and Type | Method and Description |
---|---|
Snapshot |
getSnapshot()
Returns a snapshot of the reservoir's values.
|
int |
size()
Returns the number of values recorded.
|
void |
update(long value)
Adds a new recorded value to the reservoir.
|
public SlidingWindowReservoir(int size)
SlidingWindowReservoir
which stores the last size
measurements.size
- the number of measurements to storepublic int size()
Reservoir
public void update(long value)
Reservoir
public Snapshot getSnapshot()
Reservoir
getSnapshot
in interface Reservoir
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"