Class SimpleCounterSet
java.lang.Object
org.apache.zookeeper.server.metric.Metric
org.apache.zookeeper.server.metric.SimpleCounterSet
- All Implemented Interfaces:
CounterSet
Represent a set of counters identified by different keys.
The counter is thread-safe
-
Constructor Details
-
SimpleCounterSet
-
-
Method Details
-
add
Description copied from interface:CounterSet
Increment the value by a given amount for the given keyThis method is thread safe, The MetricsProvider will take care of synchronization.
- Specified by:
add
in interfaceCounterSet
- Overrides:
add
in classMetric
- Parameters:
key
- the key to increment the count for the given keydelta
- amount to increment, this cannot be a negative number.
-
reset
public void reset() -
values
-