Class CounterImpl
- java.lang.Object
-
- org.glassfish.flashlight.datatree.impl.AbstractTreeNode
-
- org.glassfish.flashlight.statistics.impl.CounterImpl
-
- All Implemented Interfaces:
Comparable<TreeNode>,org.glassfish.external.statistics.CountStatistic,org.glassfish.external.statistics.Statistic,TreeElement,TreeNode,Counter
@Service(name="counter") @PerLookup public class CounterImpl extends AbstractTreeNode implements Counter
- 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 CounterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrement()longgetCount()StringgetDescription()longgetLastSampleTime()longgetStartTime()StringgetUnit()ObjectgetValue()voidincrement()voidincrement(long delta)voidsetCount(long count)voidsetReset(boolean reset)-
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, toString, traverse
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.glassfish.flashlight.datatree.TreeElement
getName, setName
-
Methods inherited from interface org.glassfish.flashlight.datatree.TreeNode
addChild, getCategory, getChild, getChildNodes, getCompletePathName, getEnabledChildNodes, getNode, getNodes, getNodes, getParent, getPossibleParentNode, hasChildNodes, isEnabled, removeChild, setCategory, setDescription, setEnabled, 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
-
getCount
public long getCount()
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceTreeElement- Overrides:
getValuein classAbstractTreeNode
-
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
-
-