Class AverageRangeStatisticImpl
java.lang.Object
org.glassfish.external.statistics.impl.StatisticImpl
org.glassfish.external.statistics.impl.AverageRangeStatisticImpl
- All Implemented Interfaces:
InvocationHandler, AverageRangeStatistic, RangeStatistic, Statistic
public final class AverageRangeStatisticImpl
extends StatisticImpl
implements AverageRangeStatistic, InvocationHandler
An implementation of AverageRangeStatistic that provides ways to change the
state externally through mutators. Convenience class that is useful for
components that gather the statistical data.
By merely changing the count (which is a mandatory measurement), rest of the statistical
information could be deduced.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AverageRangeStatisticprivate longprivate longprivate final longprivate final longprivate final longprivate final longprivate final longprivate longprivate longprivate longFields inherited from class StatisticImpl
LAST_SAMPLE_TIME, NEWLINE, sampleTime, START_TIME, statMap, UNIT_COUNT, UNIT_MICROSECOND, UNIT_MILLISECOND, UNIT_NANOSECOND, UNIT_SECOND -
Constructor Summary
ConstructorsConstructorDescriptionAverageRangeStatisticImpl(long curVal, long highMark, long lowMark, String name, String unit, String desc, long startTime, long sampleTime) -
Method Summary
Modifier and TypeMethodDescriptionlonglongThe current value of this attribute.longThe highest value this attribute has held since the beginninYg of the measurement.longThe lowest value this attribute has held since the beginning of the measurement.voidreset()voidsetCurrent(long curVal) toString()Methods inherited from class StatisticImpl
checkMethod, getDescription, getLastSampleTime, getName, getStartTime, getUnit, isValidStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
-
Field Details
-
currentVal
private long currentVal -
highWaterMark
private long highWaterMark -
lowWaterMark
private long lowWaterMark -
numberOfSamples
private long numberOfSamples -
runningTotal
private long runningTotal -
initCurrentVal
private final long initCurrentVal -
initHighWaterMark
private final long initHighWaterMark -
initLowWaterMark
private final long initLowWaterMark -
initNumberOfSamples
private final long initNumberOfSamples -
initRunningTotal
private final long initRunningTotal -
as
-
-
Constructor Details
-
AverageRangeStatisticImpl
-
-
Method Details
-
getStatistic
-
toString
- Overrides:
toStringin classStatisticImpl
-
getStaticAsMap
- Overrides:
getStaticAsMapin classStatisticImpl
-
reset
public void reset()- Overrides:
resetin classStatisticImpl
-
getAverage
public long getAverage()- Specified by:
getAveragein interfaceAverageRangeStatistic
-
getCurrent
public long getCurrent()Description copied from interface:RangeStatisticThe current value of this attribute.- Specified by:
getCurrentin interfaceRangeStatistic
-
setCurrent
public void setCurrent(long curVal) -
getHighWaterMark
public long getHighWaterMark()Description copied from interface:RangeStatisticThe highest value this attribute has held since the beginninYg of the measurement.- Specified by:
getHighWaterMarkin interfaceRangeStatistic
-
getLowWaterMark
public long getLowWaterMark()Description copied from interface:RangeStatisticThe lowest value this attribute has held since the beginning of the measurement.- Specified by:
getLowWaterMarkin interfaceRangeStatistic
-
invoke
-