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
Modifier and TypeMethodDescriptionvoidclear()Clear stats for this operation.voidregisterFailedEvent(long eventLatency, TimeUnit unit) Increment the failed op counter with the given eventLatency.voidregisterFailedValue(long value) An operation with the given value failed.voidregisterSuccessfulEvent(long eventLatency, TimeUnit unit) An operation succeeded with the given eventLatency.voidregisterSuccessfulValue(long value) An operation with the given value succeeded.
-
Method Details
-
registerFailedEvent
Increment the failed op counter with the given eventLatency.- Parameters:
eventLatency- The event latencyunit-
-
registerSuccessfulEvent
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.
-