Package org.apache.zookeeper.metrics
Interface CounterSet
- 
- All Known Implementing Classes:
- SimpleCounterSet
 
 public interface CounterSetA counter refers to a value which can only increase. Usually the value is reset when the process starts. A CounterSet is a set ofCountergrouped by keys.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidadd(String key, long delta)Increment the value by a given amount for the given keydefault voidinc(String key)Increment the value by one for the given key
 
- 
- 
- 
Method Detail- 
incdefault void inc(String key) 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
 
 - 
addvoid add(String key, long delta) 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 key
- delta- amount to increment, this cannot be a negative number.
 
 
- 
 
-