Top Description Fields Constructors Methods
org.glassfish.external.statistics.impl

public final Class AverageRangeStatisticImpl

extends StatisticImpl
implements AverageRangeStatistic, InvocationHandler
Class Inheritance
All Implemented Interfaces
java.lang.reflect.InvocationHandler, org.glassfish.external.statistics.AverageRangeStatistic, org.glassfish.external.statistics.RangeStatistic, org.glassfish.external.statistics.Statistic
Imports
java.util.Map, java.lang.reflect.*, org.glassfish.external.statistics.AverageRangeStatistic

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

Modifier and TypeField and Description
private final AverageRangeStatistic
private long
private long
private final long
private final long
private final long
private final long
private final long
private long
private long
private long
Inherited from org.glassfish.external.statistics.impl.StatisticImpl:
LAST_SAMPLE_TIMENEWLINEsampleTimeSTART_TIMEstatMapUNIT_COUNTUNIT_MICROSECONDUNIT_MILLISECONDUNIT_NANOSECONDUNIT_SECOND

Constructor Summary

AccessConstructor and Description
public
AverageRangeStatisticImpl(long curVal, long highMark, long lowMark, String name, String unit, String desc, long startTime, long sampleTime)

Method Summary

Modifier and TypeMethod and Description
public synchronized long
public synchronized long
getCurrent()

Implements org.glassfish.external.statistics.RangeStatistic.getCurrent.

The current value of this attribute.

public synchronized long
getHighWaterMark()

Implements org.glassfish.external.statistics.RangeStatistic.getHighWaterMark.

The highest value this attribute has held since the beginninYg of the measurement.

public synchronized long
getLowWaterMark()

Implements org.glassfish.external.statistics.RangeStatistic.getLowWaterMark.

The lowest value this attribute has held since the beginning of the measurement.

public synchronized Map<K, V>
public synchronized AverageRangeStatistic
public Object
invoke(Object proxy, Method method, Object[] args)

Implements java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result.

public synchronized void
public synchronized void
setCurrent(long curVal)

public synchronized String
toString()

Overrides org.glassfish.external.statistics.impl.StatisticImpl.toString.

Returns a string representation of the object.

Inherited from org.glassfish.external.statistics.impl.StatisticImpl:
checkMethodgetDescriptiongetLastSampleTimegetNamegetStartTimegetUnitisValidString

Field Detail

asback to summary
private final AverageRangeStatistic as
currentValback to summary
private long currentVal
highWaterMarkback to summary
private long highWaterMark
initCurrentValback to summary
private final long initCurrentVal
initHighWaterMarkback to summary
private final long initHighWaterMark
initLowWaterMarkback to summary
private final long initLowWaterMark
initNumberOfSamplesback to summary
private final long initNumberOfSamples
initRunningTotalback to summary
private final long initRunningTotal
lowWaterMarkback to summary
private long lowWaterMark
numberOfSamplesback to summary
private long numberOfSamples
runningTotalback to summary
private long runningTotal

Constructor Detail

AverageRangeStatisticImplback to summary
public AverageRangeStatisticImpl(long curVal, long highMark, long lowMark, String name, String unit, String desc, long startTime, long sampleTime)

Method Detail

getAverageback to summary
public synchronized long getAverage()

Implements org.glassfish.external.statistics.AverageRangeStatistic.getAverage.

getCurrentback to summary
public synchronized long getCurrent()

Implements org.glassfish.external.statistics.RangeStatistic.getCurrent.

Doc from org.glassfish.external.statistics.RangeStatistic.getCurrent.

The current value of this attribute.

getHighWaterMarkback to summary
public synchronized long getHighWaterMark()

Implements org.glassfish.external.statistics.RangeStatistic.getHighWaterMark.

Doc from org.glassfish.external.statistics.RangeStatistic.getHighWaterMark.

The highest value this attribute has held since the beginninYg of the measurement.

getLowWaterMarkback to summary
public synchronized long getLowWaterMark()

Implements org.glassfish.external.statistics.RangeStatistic.getLowWaterMark.

Doc from org.glassfish.external.statistics.RangeStatistic.getLowWaterMark.

The lowest value this attribute has held since the beginning of the measurement.

getStaticAsMapback to summary
public synchronized Map<K, V> getStaticAsMap()

Overrides org.glassfish.external.statistics.impl.StatisticImpl.getStaticAsMap.

getStatisticback to summary
public synchronized AverageRangeStatistic getStatistic()
invokeback to summary
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable

Implements java.lang.reflect.InvocationHandler.invoke.

Doc from java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.

Exceptions
Throwable:
the exception to throw from the method invocation on the proxy instance. The exception's type must be assignable either to any of the exception types declared in the throws clause of the invoked method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by this method that is not assignable to any of the exception types declared in the throws clause of the invoked method, then an UndeclaredThrowableException containing the exception that was thrown by this method will be thrown by the method invocation on the proxy instance.
resetback to summary
public synchronized void reset()

Overrides org.glassfish.external.statistics.impl.StatisticImpl.reset.

setCurrentback to summary
public synchronized void setCurrent(long curVal)
toStringback to summary
public synchronized String toString()

Overrides org.glassfish.external.statistics.impl.StatisticImpl.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.