Package org.apache.zookeeper.metrics
Interface CounterSet
- All Known Implementing Classes:
SimpleCounterSet
public interface CounterSet
A counter refers to a value which can only increase.
Usually the value is reset when the process starts.
A CounterSet is a set of
Counter
grouped by keys.-
Method Summary
-
Method Details
-
inc
Increment the value by one for the given keyThis method is thread safe, The MetricsProvider will take care of synchronization.
- Parameters:
key
- the key to increment the count
-
add
Increment the value by a given amount for the given keyThis method is thread safe, The MetricsProvider will take care of synchronization.
- Parameters:
key
- the key to increment the count for the given keydelta
- amount to increment, this cannot be a negative number.
-