org.apache.activemq.management
Class SizeStatisticImpl

java.lang.Object
  extended by org.apache.activemq.management.StatisticImpl
      extended by 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
SizeStatisticImpl(SizeStatisticImpl parent, String name, String description)
           
SizeStatisticImpl(String name, String description)
           
SizeStatisticImpl(String name, String unit, String description)
           
 
Method Summary
 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 statistic
 void setParent(SizeStatisticImpl parent)
           
 
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
 

Constructor Detail

SizeStatisticImpl

public SizeStatisticImpl(String name,
                         String description)

SizeStatisticImpl

public SizeStatisticImpl(SizeStatisticImpl parent,
                         String name,
                         String description)

SizeStatisticImpl

public SizeStatisticImpl(String name,
                         String unit,
                         String description)
Method Detail

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()

addSize

public void addSize(long size)

getMaxSize

public long getMaxSize()
Returns:
the maximum time of any step

getMinSize

public long getMinSize()
Returns:
the minimum time of any step

getTotalSize

public long getTotalSize()
Returns:
the total time of all the steps added together

getAverageSize

public double getAverageSize()
Returns:
the average time calculated by dividing the total time by the number of counts

getAverageSizeExcludingMinMax

public double getAverageSizeExcludingMinMax()
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 SizeStatisticImpl getParent()

setParent

public void setParent(SizeStatisticImpl parent)

appendFieldDescription

protected void appendFieldDescription(StringBuffer buffer)
Overrides:
appendFieldDescription in class StatisticImpl


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.