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 |
applicationStarted(ComponentContext context)
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.
|
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, unregisterExtension
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 applicationStarted(ComponentContext context)
Component
applicationStarted
in interface Component
applicationStarted
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 © 2015 Nuxeo SA. All rights reserved.