com.caucho.env.meter
Class AbstractMeter

java.lang.Object
  extended by com.caucho.env.meter.AbstractMeter
All Implemented Interfaces:
Meter
Direct Known Subclasses:
ActiveMeter, ActiveTimeMeter, AverageTimeMeter, ConstantStatAttribute, CountMeter, HealthMeter, JmxAttributeMeter, JmxDeltaMeter, JmxDeltaStatMeter, JmxPercentStatAttribute, JmxStatAttribute, JniCpuStat.ContextSwitchProbe, JniCpuStat.CpuActiveProbe, JniCpuStat.CpuIdleProbe, JniCpuStat.CpuSystemProbe, JniCpuStat.CpuUserProbe, JniNetStat.NetProbe, JniVmStat.VmProbe, SampleCountMeter, SemaphoreMeter, TimeMeter, TimeRangeMeter, TotalMeter

public abstract class AbstractMeter
extends java.lang.Object
implements Meter


Constructor Summary
protected AbstractMeter(java.lang.String name)
           
 
Method Summary
 java.lang.String getName()
          Returns the meter's name.
 double peek()
          Returns the current value.
abstract  double sample()
          Return the meter's next sample, resetting any counters for the next sample.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMeter

protected AbstractMeter(java.lang.String name)
Method Detail

getName

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

Specified by:
getName in interface Meter

sample

public abstract double sample()
Return the meter's next sample, resetting any counters for the next sample.

Specified by:
sample in interface Meter

peek

public double peek()
Returns the current value.

Specified by:
peek in interface Meter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object