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)
Counter
This method is thread safe, The MetricsProvider will take care of synchronization.
public long get()
Counter
This method is thread safe, The MetricsProvider will take care of synchronization.
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.