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 |
recordValue(java.lang.String name,
double value,
double alpha)
Set the current value of the gauge, smoothing accumulated values with the provided alpha value.
|
void |
reset(java.lang.String name)
Reset the gauge to zero and reset any accumulated average, max and min values
|
count, delete, delete, delete, deleteAll, exists, findAll, findAll, findOne, save, save
public void recordValue(java.lang.String name, double value, double alpha)
RichGaugeRepository
recordValue
in interface RichGaugeRepository
name
- the gauge namevalue
- the value of the gaugealpha
- the smoothing factor to usepublic void reset(java.lang.String name)
RichGaugeRepository
reset
in interface RichGaugeRepository
name
- the gauge nameprotected RichGauge getOrCreate(java.lang.String name)
getOrCreate
in class InMemoryMetricRepository<RichGauge>
protected RichGauge create(java.lang.String name)
create
in class InMemoryMetricRepository<RichGauge>