public class HealthMeter extends AbstractMeter implements SampleMetadataAware
Constructor and Description |
---|
HealthMeter(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
double |
calculate()
Calculate the current value based on the previous sample().
|
long |
getSampleId() |
java.lang.String |
getSampleName() |
void |
sample()
Sample the meter, resetting any counters for the next sample.
|
void |
setSampleMetadata(long id,
java.lang.String name) |
void |
updateStatus(HealthStatus healthStatus) |
getName, peek, toString
public void setSampleMetadata(long id, java.lang.String name)
setSampleMetadata
in interface SampleMetadataAware
public long getSampleId()
public java.lang.String getSampleName()
public void sample()
AbstractMeter
sample
in interface Meter
sample
in class AbstractMeter
public double calculate()
AbstractMeter
calculate
in interface Meter
calculate
in class AbstractMeter
public void updateStatus(HealthStatus healthStatus)