Class LongAdderCounter
- java.lang.Object
-
- org.apache.bookkeeper.stats.prometheus.LongAdderCounter
-
-
Constructor Summary
Constructors Constructor Description LongAdderCounter(java.util.Map<java.lang.String,java.lang.String> labels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCount(long delta)Add delta to the value associated with this stat.voidaddLatency(long eventLatency, java.util.concurrent.TimeUnit unit)When counter is used to count time.voidclear()Clear this stat.voiddec()Decrement the value associated with this stat.java.lang.Longget()Get the value associated with this stat.java.util.Map<java.lang.String,java.lang.String>getLabels()voidinc()Increment the value associated with this stat.voidinitializeThread(java.util.Map<java.lang.String,java.lang.String> labels)booleanisThreadInitialized()
-
-
-
Method Detail
-
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
public void addLatency(long eventLatency, java.util.concurrent.TimeUnit unit)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
public java.lang.Long get()
Description copied from interface:CounterGet the value associated with this stat.
-
getLabels
public java.util.Map<java.lang.String,java.lang.String> getLabels()
-
isThreadInitialized
public boolean isThreadInitialized()
-
initializeThread
public void initializeThread(java.util.Map<java.lang.String,java.lang.String> labels)
-
-