|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.excalibur.instrument.manager.impl.AbstractInstrumentSample
org.apache.excalibur.instrument.manager.impl.AbstractValueInstrumentSample
org.apache.excalibur.instrument.manager.impl.MeanValueInstrumentSample
class MeanValueInstrumentSample
A InstrumentSample which stores the mean value set during the sample period.
| Field Summary | |
|---|---|
private long |
m_valueTotal
Total of all values seen during the sample period. |
| Fields inherited from class org.apache.excalibur.instrument.manager.impl.AbstractValueInstrumentSample |
|---|
m_lastValue, m_value, m_valueCount |
| Fields inherited from class org.apache.excalibur.instrument.manager.impl.AbstractInstrumentSample |
|---|
m_time |
| Constructor Summary | |
|---|---|
MeanValueInstrumentSample(InstrumentProxy instrumentProxy,
java.lang.String name,
long interval,
int size,
java.lang.String description,
long lease)
Creates a new MeanValueInstrumentSample |
|
| Method Summary | |
|---|---|
protected void |
advanceToNextSample(boolean reset)
The current sample has already been stored. |
int |
getType()
Returns the type of the Instrument Sample. |
protected void |
loadState(int value,
org.apache.avalon.framework.configuration.Configuration state)
Used to load the state, called from AbstractInstrumentSample.loadState(); |
protected void |
setValueInner(int value,
long time)
Sets the current value of the sample. |
protected void |
writeStateAttributes(java.io.PrintWriter out)
Allow subclasses to add information into the saved state. |
| Methods inherited from class org.apache.excalibur.instrument.manager.impl.AbstractValueInstrumentSample |
|---|
getFillValue, getInstrumentType, getValueInner, setValue |
| Methods inherited from class org.apache.excalibur.instrument.manager.impl.AbstractInstrumentSample |
|---|
addInstrumentSampleListener, expire, extendLease, getDescription, getDescriptor, getInstrumentProxy, getInterval, getLeaseExpirationTime, getName, getSize, getSnapshot, getStateVersion, getTime, getValue, isConfigured, loadState, makePermanent, removeInstrumentSampleListener, setConfigured, stateChanged, toString, update, updateListeners, writeState |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
|---|
enableLogging |
| Field Detail |
|---|
private long m_valueTotal
| Constructor Detail |
|---|
MeanValueInstrumentSample(InstrumentProxy instrumentProxy,
java.lang.String name,
long interval,
int size,
java.lang.String description,
long lease)
instrumentProxy - The InstrumentProxy which owns the
InstrumentSample.name - The name of the new InstrumentSample.interval - The sample interval of the new InstrumentSample.size - The number of samples to store as history. Assumes that size is at least 1.description - The description of the new InstrumentSample.lease - The length of the lease in milliseconds.| Method Detail |
|---|
public int getType()
protected void advanceToNextSample(boolean reset)
Should only be called when synchronized.
advanceToNextSample in class AbstractValueInstrumentSamplereset - True if the next sample should be reset.protected void writeStateAttributes(java.io.PrintWriter out)
writeStateAttributes in class AbstractValueInstrumentSampleout - PrintWriter to write to.
protected void loadState(int value,
org.apache.avalon.framework.configuration.Configuration state)
throws org.apache.avalon.framework.configuration.ConfigurationException
Should only be called when synchronized.
loadState in class AbstractValueInstrumentSamplevalue - Current value loaded from the state.state - Configuration object to load state from.
org.apache.avalon.framework.configuration.ConfigurationException - If there were any problems loading the
state.
protected void setValueInner(int value,
long time)
setValueInner in class AbstractValueInstrumentSamplevalue - New sample value.time - Time that the new sample arrives.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||