java.lang.Object
juju.reattore.util.BaseStat
juju.reattore.util.GaugeStat
- All Implemented Interfaces:
- Stat
- public class GaugeStat
- extends BaseStat
Statistic module that manages a gauge. A gauge is a statistic
that has a current value that goes up and down, such as the number
of connections.
| Fields inherited from class juju.reattore.util.BaseStat |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
count
private long count
current
private int current
max
private int max
GaugeStat
public GaugeStat(java.lang.Class clazz,
java.lang.String leaf)
getCount
public long getCount()
- Get the total number of samples added.
inc
public void inc()
- Increases this gauge.
dec
public void dec()
- Decreases this gauge.
getCurrent
public int getCurrent()
- Get the current value of the gauge.
getMaximum
public int getMaximum()
- Get the maximum value this gauge has ever had.
getDefaultFormat
protected java.lang.String getDefaultFormat()
- Description copied from class:
BaseStat
- Returns the default format string to use.
- Specified by:
getDefaultFormat in class BaseStat
getFormatArgs
protected java.lang.Object[] getFormatArgs()
- Description copied from class:
BaseStat
- Returns the argument list used in formatting the summary.
- Specified by:
getFormatArgs in class BaseStat