Package com.yahoo.statistics
Class CounterGroup
- java.lang.Object
-
- com.yahoo.statistics.Handle
-
- com.yahoo.statistics.CounterGroup
-
public class CounterGroup extends Handle
A set of associated counters.- Author:
- Steinar Knutsen
-
-
Constructor Summary
Constructors Constructor Description CounterGroup(java.lang.String name, Statistics manager)
CounterGroup(java.lang.String name, Statistics manager, boolean fetchParametersFromConfig)
Create a basic group of counter which may or may not depend on config.CounterGroup(java.lang.String name, Statistics manager, boolean fetchParametersFromConfig, Callback callback, boolean resetCounter)
Create a group of counters with a callback included.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
void
increment(java.lang.String name)
Increment named contained counter by 1.void
increment(java.lang.String name, long n)
Increment named contained counter by n.void
runHandle()
Dump contained counters to log and reset.-
Methods inherited from class com.yahoo.statistics.Handle
cancel, isCancelled, run, runCallback
-
-
-
-
Constructor Detail
-
CounterGroup
public CounterGroup(java.lang.String name, Statistics manager)
- Parameters:
name
- The symbolic name of this group of counters.
-
CounterGroup
public CounterGroup(java.lang.String name, Statistics manager, boolean fetchParametersFromConfig)
Create a basic group of counter which may or may not depend on config.- Parameters:
name
- The symbolic name of this group of counters.manager
- the statistics manager acquired by injectionfetchParametersFromConfig
- Whether this Group should be configured from config.
-
CounterGroup
public CounterGroup(java.lang.String name, Statistics manager, boolean fetchParametersFromConfig, Callback callback, boolean resetCounter)
Create a group of counters with a callback included.- Parameters:
name
- The symbolic name of this group of counters.manager
- the statistics manager acquired by injectionfetchParametersFromConfig
- Whether this Group should be configured from config.callback
- will be invoked each time data is written to the logresetCounter
- Control for if this group should be reset between each logging interval.
-
-