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

public final Class TimeStatisticImpl

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

Author
Sreenivas Munnangi

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
TimeStatisticImpl(long counter, long maximumTime, long minimumTime, long totalTime, String name, String unit, String desc, long startTime, long sampleTime)

Method Summary

Modifier and TypeMethod and Description
public synchronized long
getCount()

Implements org.glassfish.external.statistics.TimeStatistic.getCount.

Returns the number of times an operation was invoked

public synchronized long
getMaxTime()

Implements org.glassfish.external.statistics.TimeStatistic.getMaxTime.

Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.

public synchronized long
getMinTime()

Implements org.glassfish.external.statistics.TimeStatistic.getMinTime.

Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.

public synchronized Map<K, V>
public synchronized TimeStatistic
public synchronized long
getTotalTime()

Implements org.glassfish.external.statistics.TimeStatistic.getTotalTime.

Returns the amount of time that it took for all invocations, since measurement started.

public synchronized void
incrementCount(long current)

public Object
invoke(Object proxy, Method m, 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 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

countback to summary
private long count
initCountback to summary
private final long initCount
initMaxTimeback to summary
private final long initMaxTime
initMinTimeback to summary
private final long initMinTime
initTotTimeback to summary
private final long initTotTime
maxTimeback to summary
private long maxTime
minTimeback to summary
private long minTime
totTimeback to summary
private long totTime
tsback to summary
private final TimeStatistic ts

Constructor Detail

TimeStatisticImplback to summary
public TimeStatisticImpl(long counter, long maximumTime, long minimumTime, long totalTime, String name, String unit, String desc, long startTime, long sampleTime)

Method Detail

getCountback to summary
public synchronized long getCount()

Implements org.glassfish.external.statistics.TimeStatistic.getCount.

Returns the number of times an operation was invoked

getMaxTimeback to summary
public synchronized long getMaxTime()

Implements org.glassfish.external.statistics.TimeStatistic.getMaxTime.

Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.

getMinTimeback to summary
public synchronized long getMinTime()

Implements org.glassfish.external.statistics.TimeStatistic.getMinTime.

Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.

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

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

getStatisticback to summary
public synchronized TimeStatistic getStatistic()
getTotalTimeback to summary
public synchronized long getTotalTime()

Implements org.glassfish.external.statistics.TimeStatistic.getTotalTime.

Returns the amount of time that it took for all invocations, since measurement started.

incrementCountback to summary
public synchronized void incrementCount(long current)
invokeback to summary
public Object invoke(Object proxy, Method m, 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.

Annotations
@Override
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.