com.caucho.env.health
Class HealthMeter

java.lang.Object
  extended by com.caucho.env.meter.AbstractMeter
      extended by com.caucho.env.health.HealthMeter
All Implemented Interfaces:
Meter, SampleMetadataAware

public class HealthMeter
extends AbstractMeter
implements SampleMetadataAware

A statistical meter for the health service.


Constructor Summary
HealthMeter(java.lang.String name)
           
 
Method Summary
 long getSampleId()
           
 java.lang.String getSampleName()
           
 double peek()
          Returns the current value.
 double sample()
          Return the meter's next sample, resetting any counters for the next sample.
 void setSampleMetadata(long id, java.lang.String name)
           
 void updateStatus(HealthStatus healthStatus)
           
 
Methods inherited from class com.caucho.env.meter.AbstractMeter
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HealthMeter

public HealthMeter(java.lang.String name)
Method Detail

setSampleMetadata

public void setSampleMetadata(long id,
                              java.lang.String name)
Specified by:
setSampleMetadata in interface SampleMetadataAware

getSampleId

public long getSampleId()

getSampleName

public java.lang.String getSampleName()

sample

public double sample()
Description copied from class: AbstractMeter
Return the meter's next sample, resetting any counters for the next sample.

Specified by:
sample in interface Meter
Specified by:
sample in class AbstractMeter

peek

public double peek()
Description copied from class: AbstractMeter
Returns the current value.

Specified by:
peek in interface Meter
Overrides:
peek in class AbstractMeter

updateStatus

public void updateStatus(HealthStatus healthStatus)