public class CounterGroup extends Handle
Constructor and Description |
---|
CounterGroup(String name,
Statistics manager) |
CounterGroup(String name,
Statistics manager,
boolean fetchParametersFromConfig)
Create a basic group of counter which may or may not depend on config.
|
CounterGroup(String name,
Statistics manager,
boolean fetchParametersFromConfig,
Callback callback,
boolean resetCounter)
Create a group of counters with a callback included.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
void |
increment(String name)
Increment named contained counter by 1.
|
void |
increment(String name,
long n)
Increment named contained counter by n.
|
void |
runHandle()
Dump contained counters to log and reset.
|
cancel, isCancelled, run, runCallback
public CounterGroup(String name, Statistics manager)
name
- The symbolic name of this group of counters.public CounterGroup(String name, Statistics manager, boolean fetchParametersFromConfig)
name
- The symbolic name of this group of counters.manager
- the statistics manager acquired by injectionfetchParametersFromConfig
- Whether this Group should be configured from config.public CounterGroup(String name, Statistics manager, boolean fetchParametersFromConfig, Callback callback, boolean resetCounter)
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.Copyright © 2018. All rights reserved.