Package org.apache.bookkeeper.stats
Interface Counter
-
- All Known Implementing Classes:
LongAdderCounter
,NullStatsLogger.NullCounter
,OtelCounter
,ThreadScopedLongAdderCounter
public interface Counter
Simple 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 void
addCount(long delta)
Add delta to the value associated with this stat.void
addLatency(long eventLatency, java.util.concurrent.TimeUnit unit)
An operation succeeded with the given eventLatency.void
clear()
Clear this stat.void
dec()
Decrement the value associated with this stat.java.lang.Long
get()
Get the value associated with this stat.void
inc()
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.
-
-