com.caucho.env.meter
Class JmxAttributeMeter
java.lang.Object
com.caucho.env.meter.AbstractMeter
com.caucho.env.meter.JmxAttributeMeter
- All Implemented Interfaces:
- Meter
public final class JmxAttributeMeter
- extends AbstractMeter
Constructor Summary |
JmxAttributeMeter(java.lang.String name,
java.lang.String objectName,
java.lang.String attribute,
boolean isOptional)
|
Method Summary |
double |
calculate()
Calculate the current value based on the previous sample(). |
boolean |
isOptional()
|
double |
peek()
Returns the current value. |
void |
sample()
Polls the statistics attribute. |
void |
setOptional(boolean optional)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JmxAttributeMeter
public JmxAttributeMeter(java.lang.String name,
java.lang.String objectName,
java.lang.String attribute,
boolean isOptional)
sample
public void sample()
- Polls the statistics attribute.
- Specified by:
sample
in interface Meter
- Specified by:
sample
in class AbstractMeter
calculate
public double calculate()
- Description copied from class:
AbstractMeter
- Calculate the current value based on the previous sample().
- Specified by:
calculate
in interface Meter
- Specified by:
calculate
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
isOptional
public boolean isOptional()
setOptional
public void setOptional(boolean optional)