TimeStatisticImplpublic class TimeStatisticImpl extends StatisticImpl implements javax.management.j2ee.statistics.TimeStatisticAn implementation of a TimeStatistic. All instances of this class are
immutable. Provides all the necessary accessors for properties. |
Fields Summary |
---|
private final long | count | private final long | maxTime | private final long | minTime | private final long | totTime | private static final com.sun.enterprise.util.i18n.StringManager | localStrMgr |
Constructors Summary |
---|
public TimeStatisticImpl(String name)
this(name, StatisticImpl.DEFAULT_UNIT);
| public TimeStatisticImpl(String name, String unit)
this(StatisticImpl.DEFAULT_VALUE, StatisticImpl.DEFAULT_VALUE,
StatisticImpl.DEFAULT_VALUE, StatisticImpl.DEFAULT_VALUE, name, unit,
Util.getDescriptionFromName(name), Util.getInitTime()[0], Util.getInitTime()[1]);
| public TimeStatisticImpl(String name, String unit, String desc)Constructs an immutable instance of TimeStatistic.
this(StatisticImpl.DEFAULT_VALUE, StatisticImpl.DEFAULT_VALUE,
StatisticImpl.DEFAULT_VALUE, StatisticImpl.DEFAULT_VALUE, name, unit,
desc, Util.getInitTime()[0], Util.getInitTime()[1]);
| public TimeStatisticImpl(long counter, long maximumTime, long minimumTime, long totalTime, String name, String unit, String desc, long startTime, long sampleTime)Constructs an immutable instance of TimeStatistic.
super(name, unit, desc, startTime, sampleTime);
count = counter;
maxTime = maximumTime;
minTime = minimumTime;
totTime = totalTime;
|
Methods Summary |
---|
public long | getCount()Returns the number of times an operation was invoked
return count;
| public long | getMaxTime()Returns the maximum amount of time that it took for one invocation of an
operation, since measurement started.
return maxTime;
| public long | getMinTime()Returns the minimum amount of time that it took for one invocation of an
operation, since measurement started.
return minTime;
| public long | getTotalTime()Returns the amount of time that it took for all invocations,
since measurement started.
return totTime;
| public final java.lang.String | toString()
return super.toString() + NEWLINE +
"Count: " + getCount() + NEWLINE +
"MinTime: " + getMinTime() + NEWLINE +
"MaxTime: " + getMaxTime() + NEWLINE +
"TotalTime: " + getTotalTime();
|
|