|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.excalibur.instrument.AbstractInstrument org.apache.excalibur.instrument.ValueInstrument
Objects implementing Instrumentable can create Instruments with integer values using a ValueInstrument. ValueInstruments are perfect for profiling things like system memory, or the size of a pool or cache.
Constructor Summary | |
ValueInstrument(java.lang.String name)
Creates a new ValueInstrument. |
Method Summary | |
void |
setValue(int value)
Sets the current value of the Instrument. |
Methods inherited from class org.apache.excalibur.instrument.AbstractInstrument |
getInstrumentName, getInstrumentProxy, isActive, setInstrumentProxy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ValueInstrument(java.lang.String name)
name
- The name of the Instrument. The value should be a string
which does not contain spaces or periods.Method Detail |
public void setValue(int value)
Note that in many cases is best to call this method even if the isActive() method returns false. This is because the InstrumentManager will remember the last value set and use it if the instrument ever becomes active. For things like pool sizes which do not change often, this behavior is critical so that users can begin monitoring the value and see what it was before they connected. Setting the value is very light weight, but its calculation may not be. It is up to the user to weigh the benefits and consequences one way or the other.
value
- The new value for the Instrument.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |