public final class CountMeter extends AbstractMeter implements CountSensor
Constructor and Description |
---|
CountMeter(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(CountSensor sensor)
Listeners
|
double |
calculate()
Calculate the current value based on the previous sample().
|
void |
removeListener(CountSensor sensor) |
void |
sample()
Sample the total count
|
void |
start() |
getName, peek, toString
public final void start()
start
in interface CountSensor
public final void sample()
sample
in interface Meter
sample
in class AbstractMeter
public final double calculate()
AbstractMeter
calculate
in interface Meter
calculate
in class AbstractMeter
public void addListener(CountSensor sensor)
public void removeListener(CountSensor sensor)