| Constructor and Description |
|---|
SimpleCounter(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long value)
Increment the value by a given amount.
|
long |
get()
Get the current value held by the counter.
|
void |
reset() |
Map<String,Object> |
values() |
public SimpleCounter(String name)
public void add(long value)
CounterThis method is thread safe, The MetricsProvider will take care of synchronization.
public long get()
CounterThis method is thread safe, The MetricsProvider will take care of synchronization.
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.