Package org.apache.zookeeper.metrics
Interface Counter
- 
- All Known Implementing Classes:
- SimpleCounter
 
 public interface CounterA counter refers to a value which can only increase. Usually the value is reset when the process starts.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidadd(long delta)Increment the value by a given amount.longget()Get the current value held by the counter.default voidinc()Increment the value by one.
 
- 
- 
- 
Method Detail- 
incdefault void inc() Increment the value by one.This method is thread safe, The MetricsProvider will take care of synchronization. 
 - 
addvoid add(long delta) Increment the value by a given amount.This method is thread safe, The MetricsProvider will take care of synchronization. - Parameters:
- delta- amount to increment, this cannot be a negative number.
 
 - 
getlong get() Get the current value held by the counter.This method is thread safe, The MetricsProvider will take care of synchronization. - Returns:
- the current value
 
 
- 
 
-