public abstract class AbstractStats extends Object implements IStats, StatsMXBean
| Modifier and Type | Field and Description |
|---|---|
protected static long |
MB
Constant for MegaByte.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStats()
Creates a new AbstractStats object.
|
protected |
AbstractStats(String aName)
Creates a new AbstractStats object with given name.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addStatValues(StatValue... values) |
CallExecution |
createCallExecution()
Not supported by default.
|
void |
destroy()
Called when this stats object is removed from the system.
|
List<String> |
getAvailableValueNames()
Returns the names of all contained stats.
|
String |
getName()
This method returns the name of this set of statistical values.
|
String |
getValueByNameAsString(String valueName,
String intervalName,
TimeUnit timeUnit) |
boolean |
isEmpty(String intervalName)
Returns true if this stat object didn't record anything of interest in a given interval.
|
String |
toStatsString()
This method creates a human-readable textual representation of all statistical
values in all intervals.
|
String |
toStatsString(String intervalName)
This method creates a human-readable textual representation of all statistical
values in the given interval.
|
String |
toStatsString(TimeUnit timeUnit)
This method creates a human-readable textual representation of all statistical
values in all intervals.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoStatsStringprotected static final long MB
protected AbstractStats()
protected AbstractStats(String aName)
aName - name of the stats object.public String getName()
IStatspublic String toStatsString()
IStatstoStatsString in interface IStatspublic String toStatsString(String intervalName)
IStatstoStatsString in interface IStatsintervalName - the name of the interval or null for all intervalspublic String toStatsString(TimeUnit timeUnit)
IStatstoStatsString in interface IStatspublic CallExecution createCallExecution()
createCallExecution in interface IStatspublic String getValueByNameAsString(String valueName, String intervalName, TimeUnit timeUnit)
getValueByNameAsString in interface IStatspublic List<String> getAvailableValueNames()
IStatsgetAvailableValueNames in interface IStatsgetAvailableValueNames in interface StatsMXBeanpublic boolean isEmpty(String intervalName)
IStatspublic void destroy()
IStatsprotected void addStatValues(StatValue... values)
Copyright © 2010-2017 anotheria.net. All Rights Reserved.