Package org.apache.cassandra.metrics
Class ScalingReservoir
- java.lang.Object
-
- org.apache.cassandra.metrics.ScalingReservoir
-
- All Implemented Interfaces:
com.codahale.metrics.Reservoir
,SnapshottingReservoir
public class ScalingReservoir extends java.lang.Object implements SnapshottingReservoir
A reservoir that scales the values before updating.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ScalingReservoir.ScaleFunction
Scale the input value.
-
Constructor Summary
Constructors Constructor Description ScalingReservoir(SnapshottingReservoir reservoir, ScalingReservoir.ScaleFunction scaleFunc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.codahale.metrics.Snapshot
getPercentileSnapshot()
com.codahale.metrics.Snapshot
getSnapshot()
int
size()
void
update(long value)
-
-
-
Constructor Detail
-
ScalingReservoir
public ScalingReservoir(SnapshottingReservoir reservoir, ScalingReservoir.ScaleFunction scaleFunc)
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacecom.codahale.metrics.Reservoir
-
update
public void update(long value)
- Specified by:
update
in interfacecom.codahale.metrics.Reservoir
-
getSnapshot
public com.codahale.metrics.Snapshot getSnapshot()
- Specified by:
getSnapshot
in interfacecom.codahale.metrics.Reservoir
-
getPercentileSnapshot
public com.codahale.metrics.Snapshot getPercentileSnapshot()
- Specified by:
getPercentileSnapshot
in interfaceSnapshottingReservoir
-
-