Package org.apache.activemq.management
Class SizeStatisticImpl
- java.lang.Object
-
- org.apache.activemq.management.StatisticImpl
-
- org.apache.activemq.management.SizeStatisticImpl
-
- All Implemented Interfaces:
Statistic,Resettable
public class SizeStatisticImpl extends StatisticImpl
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.management.StatisticImpl
enabled
-
-
Constructor Summary
Constructors Constructor Description SizeStatisticImpl(String name, String description)SizeStatisticImpl(String name, String unit, String description)SizeStatisticImpl(SizeStatisticImpl parent, String name, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSize(long size)protected voidappendFieldDescription(StringBuffer buffer)doublegetAveragePerSecond()doublegetAveragePerSecondExcludingMinMax()doublegetAverageSize()doublegetAverageSizeExcludingMinMax()longgetCount()longgetMaxSize()longgetMinSize()SizeStatisticImplgetParent()longgetTotalSize()voidreset()Reset the statisticvoidsetCount(long count)voidsetMaxSize(long size)voidsetMinSize(long size)voidsetParent(SizeStatisticImpl parent)voidsetTotalSize(long size)Reset the total size to the new value-
Methods inherited from class org.apache.activemq.management.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, isDoReset, isEnabled, setDoReset, setEnabled, toString, updateSampleTime
-
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:ResettableReset the statistic- Specified by:
resetin interfaceResettable- Overrides:
resetin classStatisticImpl
-
getCount
public long getCount()
-
addSize
public void addSize(long size)
-
setTotalSize
public void setTotalSize(long size)
Reset the total size to the new value- Parameters:
size-
-
getMaxSize
public long getMaxSize()
- Returns:
- the maximum size of any step
-
setMaxSize
public void setMaxSize(long size)
-
getMinSize
public long getMinSize()
- Returns:
- the minimum size of any step
-
setMinSize
public void setMinSize(long size)
-
getTotalSize
public long getTotalSize()
- Returns:
- the total size of all the steps added together
-
setCount
public void setCount(long count)
-
getAverageSize
public double getAverageSize()
- Returns:
- the average size calculated by dividing the total size by the number of counts
-
getAverageSizeExcludingMinMax
public double getAverageSizeExcludingMinMax()
- Returns:
- the average size calculated by dividing the total size by the number of counts but excluding the minimum and maximum sizes.
-
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 SizeStatisticImpl getParent()
-
setParent
public void setParent(SizeStatisticImpl parent)
-
appendFieldDescription
protected void appendFieldDescription(StringBuffer buffer)
- Overrides:
appendFieldDescriptionin classStatisticImpl
-
-