com.caucho.env.meter
Interface Meter

All Known Implementing Classes:
AbstractMeter, ActiveMeter, ActiveTimeMeter, AverageMeter, AverageTimeMeter, CountMeter, JmxAttributeMeter, JmxCalculationMeterImpl, JmxDeltaMeter, SampleCountMeter, SemaphoreMeter, TimeMeter, TimeRangeMeter, TotalMeter

public interface Meter

Meters gather information from Sensors in a ResinSystem. Some sampled meters like the CPU and JMX don't have an associated Sensor, but gather the data as they are polled. Meters typically gather information when polled and then reset any internal accumulated counters. For example, a request counter meter will clear the request count after being sampled. Meter values can typically be peeked which will return the current value without resetting internal counters.


Method Summary
 double calculate()
          Returns the meter's calculated value.
 java.lang.String getName()
          Returns the meter's name.
 double peek()
          Returns the current meter value without updating the sample.
 void sample()
          Gather the meter's next sample to be used by the calculate function.
 

Method Detail

getName

java.lang.String getName()
Returns the meter's name.


sample

void sample()
Gather the meter's next sample to be used by the calculate function.


calculate

double calculate()
Returns the meter's calculated value.


peek

double peek()
Returns the current meter value without updating the sample.