Package org.apache.activemq.management
Class SizeStatisticImpl
java.lang.Object
org.apache.activemq.management.StatisticImpl
org.apache.activemq.management.SizeStatisticImpl
- All Implemented Interfaces:
Resettable
,Statistic
-
Field Summary
Fields inherited from class org.apache.activemq.management.StatisticImpl
enabled
-
Constructor Summary
ConstructorsConstructorDescriptionSizeStatisticImpl
(String name, String description) SizeStatisticImpl
(String name, String unit, String description) SizeStatisticImpl
(SizeStatisticImpl parent, String name, String description) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSize
(long size) protected void
appendFieldDescription
(StringBuffer buffer) double
double
double
double
long
getCount()
long
long
long
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 valueMethods inherited from class org.apache.activemq.management.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, isDoReset, isEnabled, setDoReset, setEnabled, toString, updateSampleTime
-
Constructor Details
-
SizeStatisticImpl
-
SizeStatisticImpl
-
SizeStatisticImpl
-
-
Method Details
-
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
-
setParent
-
appendFieldDescription
- Overrides:
appendFieldDescription
in classStatisticImpl
-