Class SimpleCounter
- java.lang.Object
 - 
- org.apache.zookeeper.server.metric.Metric
 - 
- org.apache.zookeeper.server.metric.SimpleCounter
 
 
 
- 
- 
Constructor Summary
Constructors Constructor Description SimpleCounter(String name) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long value)Increment the value by a given amount.longget()Get the current value held by the counter.voidreset()Map<String,Object>values() 
 - 
 
- 
- 
Constructor Detail
- 
SimpleCounter
public SimpleCounter(String name)
 
 - 
 
- 
Method Detail
- 
add
public void add(long value)
Description copied from interface:CounterIncrement the value by a given amount.This method is thread safe, The MetricsProvider will take care of synchronization.
 
- 
get
public long get()
Description copied from interface:CounterGet the current value held by the counter.This method is thread safe, The MetricsProvider will take care of synchronization.
 
 - 
 
 -