Class TimeStatisticImpl
- java.lang.Object
-
- org.glassfish.external.statistics.impl.StatisticImpl
-
- org.glassfish.external.statistics.impl.TimeStatisticImpl
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler,Statistic,TimeStatistic
public final class TimeStatisticImpl extends StatisticImpl implements TimeStatistic, java.lang.reflect.InvocationHandler
-
-
Field Summary
Fields Modifier and Type Field Description private longcountprivate longinitCountprivate longinitMaxTimeprivate longinitMinTimeprivate longinitTotTimeprivate longmaxTimeprivate longminTimeprivate longtotTimeprivate TimeStatisticts-
Fields inherited from class org.glassfish.external.statistics.impl.StatisticImpl
LAST_SAMPLE_TIME, NEWLINE, sampleTime, START_TIME, statMap, UNIT_COUNT, UNIT_MICROSECOND, UNIT_MILLISECOND, UNIT_NANOSECOND, UNIT_SECOND
-
-
Constructor Summary
Constructors Constructor Description TimeStatisticImpl(long counter, long maximumTime, long minimumTime, long totalTime, java.lang.String name, java.lang.String unit, java.lang.String desc, long startTime, long sampleTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCount()Returns the number of times an operation was invokedlonggetMaxTime()Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.longgetMinTime()Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.java.util.MapgetStaticAsMap()TimeStatisticgetStatistic()longgetTotalTime()Returns the amount of time that it took for all invocations, since measurement started.voidincrementCount(long current)java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args)voidreset()java.lang.StringtoString()-
Methods inherited from class org.glassfish.external.statistics.impl.StatisticImpl
checkMethod, getDescription, getLastSampleTime, getName, getStartTime, getUnit, isValidString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.glassfish.external.statistics.Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
-
-
-
-
Field Detail
-
count
private long count
-
maxTime
private long maxTime
-
minTime
private long minTime
-
totTime
private long totTime
-
initCount
private final long initCount
-
initMaxTime
private final long initMaxTime
-
initMinTime
private final long initMinTime
-
initTotTime
private final long initTotTime
-
ts
private final TimeStatistic ts
-
-
Method Detail
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classStatisticImpl
-
getStatistic
public TimeStatistic getStatistic()
-
getStaticAsMap
public java.util.Map getStaticAsMap()
- Overrides:
getStaticAsMapin classStatisticImpl
-
incrementCount
public void incrementCount(long current)
-
getCount
public long getCount()
Returns the number of times an operation was invoked- Specified by:
getCountin interfaceTimeStatistic
-
getMaxTime
public long getMaxTime()
Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.- Specified by:
getMaxTimein interfaceTimeStatistic
-
getMinTime
public long getMinTime()
Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.- Specified by:
getMinTimein interfaceTimeStatistic
-
getTotalTime
public long getTotalTime()
Returns the amount of time that it took for all invocations, since measurement started.- Specified by:
getTotalTimein interfaceTimeStatistic
-
reset
public void reset()
- Overrides:
resetin classStatisticImpl
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args) throws java.lang.Throwable- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler- Throws:
java.lang.Throwable
-
-