public class InMemoryRichGaugeService extends java.lang.Object implements RichGaugeService
Constructor and Description |
---|
InMemoryRichGaugeService(InMemoryRichGaugeRepository gaugeRepository) |
Modifier and Type | Method and Description |
---|---|
RichGauge |
getOrCreate(java.lang.String name)
Returns an existing gauge for the given name or creates a new gauge set to zero
|
void |
reset(java.lang.String name)
Reset the gauge to zero and reset any accumulated average, max and min values
|
void |
setValue(java.lang.String name,
double value)
Sets the current value of the gauge.
|
public InMemoryRichGaugeService(InMemoryRichGaugeRepository gaugeRepository)
public RichGauge getOrCreate(java.lang.String name)
RichGaugeService
getOrCreate
in interface RichGaugeService
name
- name of the gaugepublic void setValue(java.lang.String name, double value)
RichGaugeService
setValue
in interface RichGaugeService
name
- the gauge namevalue
- the value of the gaugepublic void reset(java.lang.String name)
RichGaugeService
reset
in interface RichGaugeService
name
- the gauge name