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, wait
inc
public SimpleCounterSet(String name)
public void add(String key, long delta)
CounterSet
This method is thread safe, The MetricsProvider will take care of synchronization.
add
in interface CounterSet
add
in class Metric
key
- 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.