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 void
addSize(long size)
protected void
appendFieldDescription(StringBuffer buffer)
double
getAveragePerSecond()
double
getAveragePerSecondExcludingMinMax()
double
getAverageSize()
double
getAverageSizeExcludingMinMax()
long
getCount()
long
getMaxSize()
long
getMinSize()
SizeStatisticImpl
getParent()
long
getTotalSize()
void
reset()
Reset the statisticvoid
setCount(long count)
void
setMaxSize(long size)
void
setMinSize(long size)
void
setParent(SizeStatisticImpl parent)
void
setTotalSize(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:Resettable
Reset the statistic- Specified by:
reset
in interfaceResettable
- Overrides:
reset
in 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:
appendFieldDescription
in classStatisticImpl
-
-