Package com.codahale.metrics
Class DefaultSettableGauge<T>
- java.lang.Object
-
- com.codahale.metrics.DefaultSettableGauge<T>
-
- All Implemented Interfaces:
Gauge<T>
,Metric
,SettableGauge<T>
public class DefaultSettableGauge<T> extends Object implements SettableGauge<T>
Similar toGauge
, but metric value is updated via calling#setValue(T)
instead.
-
-
Constructor Summary
Constructors Constructor Description DefaultSettableGauge()
Create an instance with no default value.DefaultSettableGauge(T defaultValue)
Create an instance with a default value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getValue()
Returns the current value.void
setValue(T value)
Set the metric to a new value.
-
-
-
Constructor Detail
-
DefaultSettableGauge
public DefaultSettableGauge()
Create an instance with no default value.
-
DefaultSettableGauge
public DefaultSettableGauge(T defaultValue)
Create an instance with a default value.- Parameters:
defaultValue
- default value
-
-