Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.management.counters
Class CounterManagerImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.runtime.management.counters.CounterManagerImpl
All Implemented Interfaces:
CounterManager, Adaptable, Component, Extensible

public class CounterManagerImpl
extends DefaultComponent
implements CounterManager

Runtime component that provides the CounterManager service. Uses Simon Counters for implementation

Author:
Tiry (tdelprat@nuxeo.com)

Field Summary
static String COUNTER_PREFIX
           
 
Constructor Summary
CounterManagerImpl()
           
 
Method Summary
 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
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, deactivate, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COUNTER_PREFIX

public static final String COUNTER_PREFIX
See Also:
Constant Field Values
Constructor Detail

CounterManagerImpl

public CounterManagerImpl()
Method Detail

enableCounters

public void enableCounters()
Description copied from interface: CounterManager
Enables all counters

Specified by:
enableCounters in interface CounterManager

disableCounters

public void disableCounters()
Description copied from interface: CounterManager
Desable all couters

Specified by:
disableCounters in interface CounterManager

applicationStarted

public void applicationStarted(ComponentContext context)
                        throws Exception
Description copied from interface: Component
Notify the component that Nuxeo Framework finished starting all Nuxeo bundles.

Specified by:
applicationStarted in interface Component
Overrides:
applicationStarted in class DefaultComponent
Throws:
Exception

decreaseCounter

public void decreaseCounter(String counterName)
Description copied from interface: CounterManager
Decrease a counter

Specified by:
decreaseCounter in interface CounterManager

increaseCounter

public void increaseCounter(String counterName)
Description copied from interface: CounterManager
Increase a counter

Specified by:
increaseCounter in interface CounterManager

decreaseCounter

public void decreaseCounter(String counterName,
                            long value)
Specified by:
decreaseCounter in interface CounterManager

increaseCounter

public void increaseCounter(String counterName,
                            long value)
Specified by:
increaseCounter in interface CounterManager

setCounterValue

public void setCounterValue(String counterName,
                            long value)
Description copied from interface: CounterManager
Set the value of a counter

Specified by:
setCounterValue in interface CounterManager

getCounterHistory

public CounterHistoryStack getCounterHistory(String counterName)
Description copied from interface: CounterManager
Get recorder values of the counter over time

Specified by:
getCounterHistory in interface CounterManager
Returns:

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.