public class LongAdderCounter extends Object implements org.apache.bookkeeper.stats.Counter
Counter implementation based on LongAdder.
LongAdder keeps a counter per-thread and then aggregates to get the result, in order to avoid contention between multiple threads.
| Constructor and Description |
|---|
LongAdderCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long delta) |
void |
clear() |
void |
dec() |
Long |
get() |
void |
inc() |
public void clear()
clear in interface org.apache.bookkeeper.stats.Counterpublic void inc()
inc in interface org.apache.bookkeeper.stats.Counterpublic void dec()
dec in interface org.apache.bookkeeper.stats.Counterpublic void add(long delta)
add in interface org.apache.bookkeeper.stats.Counterpublic Long get()
get in interface org.apache.bookkeeper.stats.CounterCopyright © 2017–2022 Apache Software Foundation. All rights reserved.