Class SimpleCounterSet
- java.lang.Object
- 
- org.apache.zookeeper.server.metric.Metric
- 
- org.apache.zookeeper.server.metric.SimpleCounterSet
 
 
- 
- All Implemented Interfaces:
- CounterSet
 
 public class SimpleCounterSet extends Metric implements CounterSet Represent a set of counters identified by different keys. The counter is thread-safe
- 
- 
Constructor SummaryConstructors Constructor Description SimpleCounterSet(String name)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String key, long delta)Increment the value by a given amount for the given keyvoidreset()Map<String,Object>values()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.zookeeper.metrics.CounterSetinc
 
- 
 
- 
- 
- 
Constructor Detail- 
SimpleCounterSetpublic SimpleCounterSet(String name) 
 
- 
 - 
Method Detail- 
addpublic void add(String key, long delta) Description copied from interface:CounterSetIncrement the value by a given amount for the given keyThis method is thread safe, The MetricsProvider will take care of synchronization. - Specified by:
- addin interface- CounterSet
- Overrides:
- addin class- Metric
- Parameters:
- key- the key to increment the count for the given key
- delta- amount to increment, this cannot be a negative number.
 
 
- 
 
-