Class AverageImpl
- java.lang.Object
-
- org.glassfish.flashlight.datatree.impl.AbstractTreeNode
-
- org.glassfish.flashlight.statistics.impl.AverageImpl
-
- All Implemented Interfaces:
Comparable<TreeNode>
,org.glassfish.external.statistics.RangeStatistic
,org.glassfish.external.statistics.Statistic
,TreeElement
,TreeNode
,Average
@Service(name="average") @PerLookup public class AverageImpl extends AbstractTreeNode implements Average
- Author:
- Harpreet Singh
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_MAX_BOUND
DEFAULT_UPPER_BOUND is maximum value Long can attainstatic long
DEFAULT_MIN_BOUND
static long
DEFAULT_VALUE
DEFAULT_LOWER_BOUND is same as DEFAULT_VALUE i.e.protected static String
NEWLINE
DEFAULT_VALUE of any statistic is 0-
Fields inherited from class org.glassfish.flashlight.datatree.impl.AbstractTreeNode
category, children, description, enabled, name
-
-
Constructor Summary
Constructors Constructor Description AverageImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataPoint(long value)
double
getAverage()
long
getCurrent()
String
getDescription()
long
getHighWaterMark()
long
getLastSampleTime()
long
getLowWaterMark()
long
getMax()
long
getMin()
long
getSize()
long
getStartTime()
long
getTotal()
String
getUnit()
Object
getValue()
void
setReset()
String
toString()
-
Methods inherited from class org.glassfish.flashlight.datatree.impl.AbstractTreeNode
addChild, compareTo, equals, getCategory, getChild, getChildNodes, getChildNodesImmutable, getCompletePathName, getEnabledChildNodes, getName, getNode, getNodes, getNodes, getParent, getPossibleParentNode, hasChildNodes, hashCode, isEnabled, removeChild, setCategory, setDescription, setEnabled, setName, setParent, traverse
-
-
-
-
Field Detail
-
DEFAULT_MAX_BOUND
public static final long DEFAULT_MAX_BOUND
DEFAULT_UPPER_BOUND is maximum value Long can attain- See Also:
- Constant Field Values
-
DEFAULT_VALUE
public static final long DEFAULT_VALUE
DEFAULT_LOWER_BOUND is same as DEFAULT_VALUE i.e. 0
-
DEFAULT_MIN_BOUND
public static final long DEFAULT_MIN_BOUND
-
NEWLINE
protected static final String NEWLINE
DEFAULT_VALUE of any statistic is 0
-
-
Method Detail
-
addDataPoint
public void addDataPoint(long value)
- Specified by:
addDataPoint
in interfaceAverage
-
getAverage
public double getAverage()
- Specified by:
getAverage
in interfaceAverage
-
toString
public String toString()
- Overrides:
toString
in classAbstractTreeNode
-
getValue
public Object getValue()
- Specified by:
getValue
in interfaceTreeElement
- Overrides:
getValue
in classAbstractTreeNode
-
getHighWaterMark
public long getHighWaterMark()
- Specified by:
getHighWaterMark
in interfaceorg.glassfish.external.statistics.RangeStatistic
-
getLowWaterMark
public long getLowWaterMark()
- Specified by:
getLowWaterMark
in interfaceorg.glassfish.external.statistics.RangeStatistic
-
getCurrent
public long getCurrent()
- Specified by:
getCurrent
in interfaceorg.glassfish.external.statistics.RangeStatistic
-
getUnit
public String getUnit()
- Specified by:
getUnit
in interfaceorg.glassfish.external.statistics.Statistic
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceorg.glassfish.external.statistics.Statistic
- Specified by:
getDescription
in interfaceTreeNode
- Overrides:
getDescription
in classAbstractTreeNode
-
getStartTime
public long getStartTime()
- Specified by:
getStartTime
in interfaceorg.glassfish.external.statistics.Statistic
-
getLastSampleTime
public long getLastSampleTime()
- Specified by:
getLastSampleTime
in interfaceorg.glassfish.external.statistics.Statistic
-
-