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 longDEFAULT_MAX_BOUNDDEFAULT_UPPER_BOUND is maximum value Long can attainstatic longDEFAULT_MIN_BOUNDstatic longDEFAULT_VALUEDEFAULT_LOWER_BOUND is same as DEFAULT_VALUE i.e.protected static StringNEWLINEDEFAULT_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 voidaddDataPoint(long value)doublegetAverage()longgetCurrent()StringgetDescription()longgetHighWaterMark()longgetLastSampleTime()longgetLowWaterMark()longgetMax()longgetMin()longgetSize()longgetStartTime()longgetTotal()StringgetUnit()ObjectgetValue()voidsetReset()StringtoString()-
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:
addDataPointin interfaceAverage
-
getAverage
public double getAverage()
- Specified by:
getAveragein interfaceAverage
-
toString
public String toString()
- Overrides:
toStringin classAbstractTreeNode
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceTreeElement- Overrides:
getValuein classAbstractTreeNode
-
getHighWaterMark
public long getHighWaterMark()
- Specified by:
getHighWaterMarkin interfaceorg.glassfish.external.statistics.RangeStatistic
-
getLowWaterMark
public long getLowWaterMark()
- Specified by:
getLowWaterMarkin interfaceorg.glassfish.external.statistics.RangeStatistic
-
getCurrent
public long getCurrent()
- Specified by:
getCurrentin interfaceorg.glassfish.external.statistics.RangeStatistic
-
getUnit
public String getUnit()
- Specified by:
getUnitin interfaceorg.glassfish.external.statistics.Statistic
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceorg.glassfish.external.statistics.Statistic- Specified by:
getDescriptionin interfaceTreeNode- Overrides:
getDescriptionin classAbstractTreeNode
-
getStartTime
public long getStartTime()
- Specified by:
getStartTimein interfaceorg.glassfish.external.statistics.Statistic
-
getLastSampleTime
public long getLastSampleTime()
- Specified by:
getLastSampleTimein interfaceorg.glassfish.external.statistics.Statistic
-
-