java.lang.Object
juju.reattore.util.BaseStat
- All Implemented Interfaces:
- Stat
- Direct Known Subclasses:
- CounterStat, DurationStat, GaugeStat, RateStat
- public abstract class BaseStat
- extends java.lang.Object
- implements Stat
Base implementation of a statistic module.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fmt
private java.lang.String fmt
name
private java.lang.String name
BaseStat
public BaseStat(java.lang.Class clazz,
java.lang.String leaf)
- Create a new statistic for the given class and leaf name.
getDefaultFormat
protected abstract java.lang.String getDefaultFormat()
- Returns the default format string to use.
getFormatArgs
protected abstract java.lang.Object[] getFormatArgs()
- Returns the argument list used in formatting the summary.
getName
public java.lang.String getName()
- Returns the fully qualified name of this stat.
- Specified by:
getName in interface Stat
setFormat
public void setFormat(java.lang.String fmt)
- Sets the format used in summarising this stat.
- Specified by:
setFormat in interface Stat
format
public java.lang.String format()
- Summarise this statistic as a string.
- Specified by:
format in interface Stat