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| Constructor and Description |
|---|
CounterManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
applicationStarted(ComponentContext context) |
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
|
activate, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, unregisterContribution, unregisterExtensionpublic static final String COUNTER_PREFIX
protected CounterHistoryRecorder history
public void enableCounters()
CounterManagerenableCounters in interface CounterManagerpublic void disableCounters()
CounterManagerdisableCounters in interface CounterManagerpublic void applicationStarted(ComponentContext context) throws Exception
applicationStarted in interface ComponentapplicationStarted in class DefaultComponentExceptionpublic 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 © 2019 Nuxeo SA. All rights reserved.