public class InMemoryRichGaugeRepository extends InMemoryMetricRepository<RichGauge> implements RichGaugeRepository
Constructor and Description |
---|
InMemoryRichGaugeRepository() |
Modifier and Type | Method and Description |
---|---|
protected RichGauge |
create(java.lang.String name) |
protected RichGauge |
getOrCreate(java.lang.String name) |
void |
reset(java.lang.String name)
Reset the gauge to zero and reset any accumulated average, max and min values
|
void |
setAlpha(java.lang.String name,
double value)
Sets the "smoothing constant", "alpha" for use in calculating an exponential moving average for the
gauge.
|
void |
setValue(java.lang.String name,
double value)
Sets the current value of the gauge.
|
count, delete, delete, delete, deleteAll, exists, findAll, findAll, findOne, save, save
protected RichGauge create(java.lang.String name)
create
in class InMemoryMetricRepository<RichGauge>
protected RichGauge getOrCreate(java.lang.String name)
getOrCreate
in class InMemoryMetricRepository<RichGauge>
public void setValue(java.lang.String name, double value)
RichGaugeRepository
setValue
in interface RichGaugeRepository
name
- the gauge namevalue
- the value of the gaugepublic void setAlpha(java.lang.String name, double value)
RichGaugeRepository
The parameter can be set at any time after the gauge has been created. The mean calculated up to that point will be used to initialize the moving average from that point on.
setAlpha
in interface RichGaugeRepository
name
- the gauge namevalue
- the value of the gaugepublic void reset(java.lang.String name)
RichGaugeRepository
reset
in interface RichGaugeRepository
name
- the gauge name