org.glassfish.external.statistics.impl
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.
AverageRangeStatisticImpl
public AverageRangeStatisticImpl(long curVal,
long highMark,
long lowMark,
String name,
String unit,
String desc,
long startTime,
long sampleTime)
getStatistic
public AverageRangeStatistic getStatistic()
toString
public String toString()
- Overrides:
toString in class StatisticImpl
getStaticAsMap
public Map getStaticAsMap()
- Overrides:
getStaticAsMap in class StatisticImpl
reset
public void reset()
- Overrides:
reset in class StatisticImpl
getAverage
public long getAverage()
- Specified by:
getAverage in interface AverageRangeStatistic
getCurrent
public long getCurrent()
- Description copied from interface:
RangeStatistic
- The current value of this attribute.
- Specified by:
getCurrent in interface RangeStatistic
setCurrent
public void setCurrent(long curVal)
getHighWaterMark
public long getHighWaterMark()
- Description copied from interface:
RangeStatistic
- The highest value this attribute has held since the beginninYg of the measurement.
- Specified by:
getHighWaterMark in interface RangeStatistic
getLowWaterMark
public long getLowWaterMark()
- Description copied from interface:
RangeStatistic
- The lowest value this attribute has held since the beginning of the measurement.
- Specified by:
getLowWaterMark in interface RangeStatistic
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Specified by:
invoke in interface InvocationHandler
- Throws:
Throwable
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.