Top Description Fields Constructors Methods
net.sf.ehcache.util.counter

public Class CounterManagerImpl

extends Object
implements CounterManager
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.util.counter.CounterManager
Imports
java.security.AccessController, .PrivilegedAction, java.util.ArrayList, .List, .TimerTask, net.sf.ehcache.util.FailSafeTimer, net.sf.ehcache.util.counter.sampled.SampledCounter, .SampledCounterImpl

An implementation of a CounterManager.
Author
Abhishek Sanoujam
Since
1.7

Field Summary

Modifier and TypeField and Description
private final List<Counter>
private boolean
private final FailSafeTimer

Constructor Summary

AccessConstructor and Description
public
CounterManagerImpl(FailSafeTimer timer)

Constructor that accepts a timer that will be used for scheduling sampled counter if any is created

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public synchronized Counter
createCounter(CounterConfig config)

Implements net.sf.ehcache.util.counter.CounterManager.createCounter.

Creates a Counter based on the passed config
public synchronized void
shutdown()

Implements net.sf.ehcache.util.counter.CounterManager.shutdown.

Shuts down this counter manager
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countersback to summary
private final List<Counter> counters
shutdownback to summary
private boolean shutdown
timerback to summary
private final FailSafeTimer timer

Constructor Detail

CounterManagerImplback to summary
public CounterManagerImpl(FailSafeTimer timer)

Constructor that accepts a timer that will be used for scheduling sampled counter if any is created

Method Detail

addCounterback to summary
public synchronized void addCounter(Counter counter)

Implements net.sf.ehcache.util.counter.CounterManager.addCounter.

Doc from net.sf.ehcache.util.counter.CounterManager.addCounter.

Adds a counter.

createCounterback to summary
public synchronized Counter createCounter(CounterConfig config)

Implements net.sf.ehcache.util.counter.CounterManager.createCounter.

Doc from net.sf.ehcache.util.counter.CounterManager.createCounter.

Creates a Counter based on the passed config

Returns:Counter

The counter created and managed by this CounterManager

shutdownback to summary
public synchronized void shutdown()

Implements net.sf.ehcache.util.counter.CounterManager.shutdown.

Doc from net.sf.ehcache.util.counter.CounterManager.shutdown.

Shuts down this counter manager

shutdownCounterback to summary
public void shutdownCounter(Counter counter)

Implements net.sf.ehcache.util.counter.CounterManager.shutdownCounter.

Doc from net.sf.ehcache.util.counter.CounterManager.shutdownCounter.

Shuts down the counter