Class LongAdderCounter
java.lang.Object
org.apache.bookkeeper.stats.prometheus.LongAdderCounter
- All Implemented Interfaces:
Counter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCount(long delta) Add delta to the value associated with this stat.voidaddLatency(long eventLatency, TimeUnit unit) When counter is used to count time.voidclear()Clear this stat.voiddec()Decrement the value associated with this stat.get()Get the value associated with this stat.voidinc()Increment the value associated with this stat.voidinitializeThread(Map<String, String> labels) boolean
-
Constructor Details
-
LongAdderCounter
-
-
Method Details
-
clear
public void clear()Description copied from interface:CounterClear this stat. -
inc
public void inc()Description copied from interface:CounterIncrement the value associated with this stat. -
dec
public void dec()Description copied from interface:CounterDecrement the value associated with this stat. -
addCount
public void addCount(long delta) Description copied from interface:CounterAdd delta to the value associated with this stat. -
addLatency
When counter is used to count time. consistent with theDataSketchesOpStatsLogger.registerSuccessfulEvent(long, TimeUnit)'s logic- Specified by:
addLatencyin interfaceCounter- Parameters:
eventLatency- The event latency
-
get
Description copied from interface:CounterGet the value associated with this stat. -
getLabels
-
isThreadInitialized
public boolean isThreadInitialized() -
initializeThread
-