public class CounterManagerImpl extends java.lang.Object implements CounterManager
CounterManager
.Modifier and Type | Field and Description |
---|---|
private java.util.List<Counter> |
counters |
private boolean |
shutdown |
private FailSafeTimer |
timer |
Constructor and Description |
---|
CounterManagerImpl(FailSafeTimer timer)
Constructor that accepts a timer that will be used for scheduling sampled
counter if any is created
|
Modifier and Type | Method and Description |
---|---|
void |
addCounter(Counter counter)
Adds a counter.
|
Counter |
createCounter(CounterConfig config)
Creates a Counter based on the passed config
|
void |
shutdown()
Shuts down this counter manager
|
void |
shutdownCounter(Counter counter)
Shuts down the counter
|
private final FailSafeTimer timer
private boolean shutdown
private final java.util.List<Counter> counters
public CounterManagerImpl(FailSafeTimer timer)
public void shutdown()
shutdown
in interface CounterManager
public Counter createCounter(CounterConfig config)
createCounter
in interface CounterManager
public void addCounter(Counter counter)
addCounter
in interface CounterManager
public void shutdownCounter(Counter counter)
shutdownCounter
in interface CounterManager