Interface CounterManager

  • public interface CounterManager
    The CounterManager creates, defines and returns counters.

    It is thread-safe in the way that multiples threads can retrieve/create counters concurrently. If it is the first time a counter is created, other concurrent threads may block until it is properly initialized.

    A counter can be defined using defineCounter(String, CounterConfiguration) and isDefined(String) returns if the counter is defined or not.

    The counter can be retrieved/created using the getStrongCounter(String) or getWeakCounter(String) to return an (un)bounded strong counter or weak counter. The operation will fail if the counter is defined with a different type. For example, define a strong counter "test" and try to retrieve using the getWeakCounter("test".

    Pedro Ruivo
    See Also: