Class OpStatsListener<T>
- java.lang.Object
-
- org.apache.bookkeeper.common.stats.OpStatsListener<T>
-
- All Implemented Interfaces:
java.util.function.BiConsumer<T,java.lang.Throwable>
,FutureEventListener<T>
public class OpStatsListener<T> extends java.lang.Object implements FutureEventListener<T>
AFutureEventListener
monitors the stats for a given operation.
-
-
Constructor Summary
Constructors Constructor Description OpStatsListener(OpStatsLogger opStatsLogger)
OpStatsListener(OpStatsLogger opStatsLogger, com.google.common.base.Stopwatch stopwatch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onFailure(java.lang.Throwable cause)
void
onSuccess(T value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.bookkeeper.common.concurrent.FutureEventListener
accept
-
-
-
-
Constructor Detail
-
OpStatsListener
public OpStatsListener(OpStatsLogger opStatsLogger, com.google.common.base.Stopwatch stopwatch)
-
OpStatsListener
public OpStatsListener(OpStatsLogger opStatsLogger)
-
-
Method Detail
-
onSuccess
public void onSuccess(T value)
- Specified by:
onSuccess
in interfaceFutureEventListener<T>
-
onFailure
public void onFailure(java.lang.Throwable cause)
- Specified by:
onFailure
in interfaceFutureEventListener<T>
-
-