public class CounterManagerImpl extends DefaultComponent implements CounterManager
CounterManager service. Uses Simon Counters for implementation| Modifier and Type | Field and Description |
|---|---|
static String |
COUNTER_PREFIX |
protected CounterHistoryRecorder |
history |
lastModified, name| Constructor and Description |
|---|
CounterManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
decreaseCounter(String counterName)
Decrease a counter
|
void |
decreaseCounter(String counterName,
long value) |
void |
disableCounters()
Desable all couters
|
void |
enableCounters()
Enables all counters
|
CounterHistoryStack |
getCounterHistory(String counterName)
Get recorder values of the counter over time
|
void |
increaseCounter(String counterName)
Increase a counter
|
void |
increaseCounter(String counterName,
long value) |
void |
setCounterValue(String counterName,
long value)
Set the value of a counter
|
void |
start(ComponentContext context)
Start the component.
|
activate, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterContribution, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderpublic static final String COUNTER_PREFIX
protected CounterHistoryRecorder history
public CounterManagerImpl()
public void enableCounters()
CounterManagerenableCounters in interface CounterManagerpublic void disableCounters()
CounterManagerdisableCounters in interface CounterManagerpublic void start(ComponentContext context)
Componentstart in interface Componentstart in class DefaultComponentpublic void decreaseCounter(String counterName)
CounterManagerdecreaseCounter in interface CounterManagerpublic void increaseCounter(String counterName)
CounterManagerincreaseCounter in interface CounterManagerpublic void decreaseCounter(String counterName, long value)
decreaseCounter in interface CounterManagerpublic void increaseCounter(String counterName, long value)
increaseCounter in interface CounterManagerpublic void setCounterValue(String counterName, long value)
CounterManagersetCounterValue in interface CounterManagerpublic CounterHistoryStack getCounterHistory(String counterName)
CounterManagergetCounterHistory in interface CounterManagerCopyright © 2018 Nuxeo. All rights reserved.