public interface Counter
Modifier and Type | Method and Description |
---|---|
void |
add(long delta)
Increment the value by a given amount.
|
long |
get()
Get the current value held by the counter.
|
default void |
inc()
Increment the value by one.
|
default void inc()
This method is thread safe, The MetricsProvider will take care of synchronization.
void add(long delta)
This method is thread safe, The MetricsProvider will take care of synchronization.
delta
- amount to increment, this cannot be a negative number.long get()
This method is thread safe, The MetricsProvider will take care of synchronization.
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.