Package org.apache.bookkeeper.stats
Interface OpStatsLogger
-
- All Known Implementing Classes:
CodahaleOpStatsLogger
,DataSketchesOpStatsLogger
,NullStatsLogger.NullOpStatsLogger
,OtelOpStatsLogger
,ThreadScopedDataSketchesStatsLogger
public interface OpStatsLogger
This interface handles logging of statistics related to each operation. (PUBLISH, CONSUME etc.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clear stats for this operation.void
registerFailedEvent(long eventLatency, java.util.concurrent.TimeUnit unit)
Increment the failed op counter with the given eventLatency.void
registerFailedValue(long value)
An operation with the given value failed.void
registerSuccessfulEvent(long eventLatency, java.util.concurrent.TimeUnit unit)
An operation succeeded with the given eventLatency.void
registerSuccessfulValue(long value)
An operation with the given value succeeded.OpStatsData
toOpStatsData()
-
-
-
Method Detail
-
registerFailedEvent
void registerFailedEvent(long eventLatency, java.util.concurrent.TimeUnit unit)
Increment the failed op counter with the given eventLatency.- Parameters:
eventLatency
- The event latencyunit
-
-
registerSuccessfulEvent
void registerSuccessfulEvent(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
-
-
registerSuccessfulValue
void registerSuccessfulValue(long value)
An operation with the given value succeeded.- Parameters:
value
-
-
registerFailedValue
void registerFailedValue(long value)
An operation with the given value failed.
-
toOpStatsData
OpStatsData toOpStatsData()
- Returns:
- Returns an OpStatsData object with necessary values. We need this function to support JMX exports. This should be deprecated sometime in the near future. populated.
-
clear
void clear()
Clear stats for this operation.
-
-