public class CounterManagerImpl extends DefaultComponent implements CounterManager
CounterManager
service. Uses Simon Counters for implementationModifier and Type | Field and Description |
---|---|
static String |
COUNTER_PREFIX |
protected CounterHistoryRecorder |
history |
lastModified
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, getLastModified, registerContribution, registerExtension, setLastModified, setModifiedNow, stop, unregisterContribution, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final String COUNTER_PREFIX
protected CounterHistoryRecorder history
public CounterManagerImpl()
public void enableCounters()
CounterManager
enableCounters
in interface CounterManager
public void disableCounters()
CounterManager
disableCounters
in interface CounterManager
public void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
public void decreaseCounter(String counterName)
CounterManager
decreaseCounter
in interface CounterManager
public void increaseCounter(String counterName)
CounterManager
increaseCounter
in interface CounterManager
public void decreaseCounter(String counterName, long value)
decreaseCounter
in interface CounterManager
public void increaseCounter(String counterName, long value)
increaseCounter
in interface CounterManager
public void setCounterValue(String counterName, long value)
CounterManager
setCounterValue
in interface CounterManager
public CounterHistoryStack getCounterHistory(String counterName)
CounterManager
getCounterHistory
in interface CounterManager
Copyright © 2017 Nuxeo. All rights reserved.