org.apache.activemq.management
Class TimeStatisticImpl
java.lang.Object
org.apache.activemq.management.StatisticImpl
org.apache.activemq.management.TimeStatisticImpl
- All Implemented Interfaces:
- javax.management.j2ee.statistics.Statistic, Resettable
public class TimeStatisticImpl
- extends StatisticImpl
A time statistic implementation
Methods inherited from class org.apache.activemq.management.StatisticImpl |
getDescription, getLastSampleTime, getName, getStartTime, getUnit, isDoReset, isEnabled, setDoReset, setEnabled, toString, updateSampleTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TimeStatisticImpl
public TimeStatisticImpl(java.lang.String name,
java.lang.String description)
TimeStatisticImpl
public TimeStatisticImpl(TimeStatisticImpl parent,
java.lang.String name,
java.lang.String description)
TimeStatisticImpl
public TimeStatisticImpl(java.lang.String name,
java.lang.String unit,
java.lang.String description)
reset
public void reset()
- Description copied from interface:
Resettable
- Reset the statistic
- Specified by:
reset
in interface Resettable
- Overrides:
reset
in class StatisticImpl
getCount
public long getCount()
addTime
public void addTime(long time)
getMaxTime
public long getMaxTime()
- Returns:
- the maximum time of any step
getMinTime
public long getMinTime()
- Returns:
- the minimum time of any step
getTotalTime
public long getTotalTime()
- Returns:
- the total time of all the steps added together
getAverageTime
public double getAverageTime()
- Returns:
- the average time calculated by dividing the
total time by the number of counts
getAverageTimeExcludingMinMax
public double getAverageTimeExcludingMinMax()
- Returns:
- the average time calculated by dividing the
total time by the number of counts but excluding the
minimum and maximum times.
getAveragePerSecond
public double getAveragePerSecond()
- Returns:
- the average number of steps per second
getAveragePerSecondExcludingMinMax
public double getAveragePerSecondExcludingMinMax()
- Returns:
- the average number of steps per second excluding the min & max values
getParent
public TimeStatisticImpl getParent()
setParent
public void setParent(TimeStatisticImpl parent)
appendFieldDescription
protected void appendFieldDescription(java.lang.StringBuffer buffer)
- Overrides:
appendFieldDescription
in class StatisticImpl
Copyright © 2005-2011. All Rights Reserved.