public class SimpleCounterSet extends Metric implements CounterSet
| Constructor and Description |
|---|
SimpleCounterSet(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String key,
long delta)
Increment the value by a given amount for the given key
|
void |
reset() |
Map<String,Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitincpublic SimpleCounterSet(String name)
public void add(String key, long delta)
CounterSetThis method is thread safe, The MetricsProvider will take care of synchronization.
add in interface CounterSetadd in class Metrickey - the key to increment the count for the given keydelta - amount to increment, this cannot be a negative number.Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.