public class RedisGaugeService extends java.lang.Object implements GaugeService
Constructor and Description |
---|
RedisGaugeService(RedisGaugeRepository gaugeRepository) |
Modifier and Type | Method and Description |
---|---|
Gauge |
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
|
void |
setValue(java.lang.String name,
long value)
Set the value of the gauge
|
public RedisGaugeService(RedisGaugeRepository gaugeRepository)
public Gauge getOrCreate(java.lang.String name)
GaugeService
getOrCreate
in interface GaugeService
name
- name of the gaugepublic void reset(java.lang.String name)
GaugeService
reset
in interface GaugeService
name
- the gauge namepublic void setValue(java.lang.String name, long value)
GaugeService
setValue
in interface GaugeService
name
- the gauge namevalue
- the value of the gauge