|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface IStats.Counter
Interface used to collect and provide access to a monotonically increasing counter.
A IStats.Counter
is useful for recording an increasing value over time. Sampled
periodically it can be used to derive a rate. For example a counter could be used
to record a number of message received. By sampling it over time it can be used
to create a received message rate.
Method Summary | |
---|---|
void |
compute()
Computes statistic values. |
void |
get(StringBuilder builder,
NumberFormat format)
Appends the counter value and any computed stats calculated by compute()
to the provided StringBuilder . |
long |
getCount()
Gets the current counter value. |
String |
getName()
Gets statistic name. |
XString |
getNameAsRaw()
Gets the stat's name as a XString . |
void |
increment()
Increments the counter. |
void |
increment(int count)
Increments the counter. |
void |
reset()
Clears and resets the counter. |
Method Detail |
---|
String getName()
XString getNameAsRaw()
XString
.
void increment()
void increment(int count)
count
- The amount to increment (must be positive)long getCount()
void compute()
void get(StringBuilder builder, NumberFormat format)
compute()
to the provided StringBuilder
.
void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |