public class MaxReservoir extends Object implements com.codahale.metrics.Reservoir
Reservoir
that keeps track of the max
value sent as an update to this reservoir. Any snapshot returned
by the reservoir will return this max value.Constructor and Description |
---|
MaxReservoir(com.codahale.metrics.Reservoir delegate) |
Modifier and Type | Method and Description |
---|---|
com.codahale.metrics.Snapshot |
getSnapshot()
Returns a snapshot of the reservoir's values, which has the max value
set as the overall max value sent as an update to this reservoir.
|
int |
size()
Returns the number of values recorded.
|
void |
update(long value)
Adds a new recorded value to the reservoir.
|
public MaxReservoir(com.codahale.metrics.Reservoir delegate)
delegate
- the delegate reservoir to wrappublic int size()
size
in interface com.codahale.metrics.Reservoir
public void update(long value)
update
in interface com.codahale.metrics.Reservoir
value
- a new recorded valuepublic com.codahale.metrics.Snapshot getSnapshot()
getSnapshot
in interface com.codahale.metrics.Reservoir
Copyright © 2023. All Rights Reserved.