org.glassfish.external.statistics.impl
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
- Author:
- Sreenivas Munnangi
Constructor Summary |
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 |
long |
getCount()
Returns the number of times an operation was invoked |
long |
getMaxTime()
Returns the maximum amount of time that it took for one invocation of an
operation, since measurement started. |
long |
getMinTime()
Returns the minimum amount of time that it took for one invocation of an
operation, since measurement started. |
java.util.Map |
getStaticAsMap()
|
TimeStatistic |
getStatistic()
|
long |
getTotalTime()
Returns the amount of time that it took for all invocations,
since measurement started. |
void |
incrementCount(long current)
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method m,
java.lang.Object[] args)
|
void |
reset()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TimeStatisticImpl
public 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)
toString
public final java.lang.String toString()
- Overrides:
toString
in class StatisticImpl
getStatistic
public TimeStatistic getStatistic()
getStaticAsMap
public java.util.Map getStaticAsMap()
- Overrides:
getStaticAsMap
in class StatisticImpl
incrementCount
public void incrementCount(long current)
getCount
public long getCount()
- Returns the number of times an operation was invoked
- Specified by:
getCount
in interface TimeStatistic
getMaxTime
public long getMaxTime()
- Returns the maximum amount of time that it took for one invocation of an
operation, since measurement started.
- Specified by:
getMaxTime
in interface TimeStatistic
getMinTime
public long getMinTime()
- Returns the minimum amount of time that it took for one invocation of an
operation, since measurement started.
- Specified by:
getMinTime
in interface TimeStatistic
getTotalTime
public long getTotalTime()
- Returns the amount of time that it took for all invocations,
since measurement started.
- Specified by:
getTotalTime
in interface TimeStatistic
reset
public void reset()
- Overrides:
reset
in class StatisticImpl
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:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable