Package org.apache.bookkeeper.stats
Interface Counter
-
- All Known Implementing Classes:
LongAdderCounter,NullStatsLogger.NullCounter,OtelCounter,ThreadScopedLongAdderCounter
public interface CounterSimple stats that require only increment and decrement functions on a Long. Metrics like the number of topics, persist queue size etc. should use this.
-
-
Method Summary
All Methods Instance Methods Abstract 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)An operation succeeded with the given eventLatency.voidclear()Clear this stat.voiddec()Decrement the value associated with this stat.java.lang.Longget()Get the value associated with this stat.voidinc()Increment the value associated with this stat.
-
-
-
Method Detail
-
clear
void clear()
Clear this stat.
-
inc
void inc()
Increment the value associated with this stat.
-
dec
void dec()
Decrement the value associated with this stat.
-
addCount
void addCount(long delta)
Add delta to the value associated with this stat.- Parameters:
delta-
-
addLatency
void addLatency(long eventLatency, java.util.concurrent.TimeUnit unit)An operation succeeded with the given eventLatency. Update stats to reflect the same- Parameters:
eventLatency- The event latencyunit-
-
get
java.lang.Long get()
Get the value associated with this stat.
-
-