Class LifeCycleStatsCollector<T>
- java.lang.Object
-
- com.linkedin.alpini.base.pool.impl.LifeCycleFilter<T>
-
- com.linkedin.alpini.base.pool.impl.LifeCycleStatsCollector<T>
-
- All Implemented Interfaces:
AsyncPool.LifeCycle<T>
public class LifeCycleStatsCollector<T> extends LifeCycleFilter<T>
-
-
Constructor Summary
Constructors Constructor Description LifeCycleStatsCollector(AsyncPool.LifeCycle<T> lifeCycle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<T>
create()
protected CallTracker
createCallTracker()
java.util.concurrent.CompletableFuture<java.lang.Void>
destroy(T entity)
CallTracker.CallStats
getCreateCallStats()
CallTracker.CallStats
getDestroyCallStats()
CallTracker.CallStats
getTestCallStats()
java.util.concurrent.CompletableFuture<java.lang.Boolean>
testAfterIdle(T entity)
java.util.concurrent.CompletableFuture<java.lang.Boolean>
testOnRelease(T entity)
-
Methods inherited from class com.linkedin.alpini.base.pool.impl.LifeCycleFilter
isWrapperFor, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.alpini.base.pool.AsyncPool.LifeCycle
shutdown
-
-
-
-
Constructor Detail
-
LifeCycleStatsCollector
public LifeCycleStatsCollector(@Nonnull AsyncPool.LifeCycle<T> lifeCycle)
-
-
Method Detail
-
createCallTracker
protected CallTracker createCallTracker()
-
create
public java.util.concurrent.CompletableFuture<T> create()
- Specified by:
create
in interfaceAsyncPool.LifeCycle<T>
- Overrides:
create
in classLifeCycleFilter<T>
-
getCreateCallStats
public CallTracker.CallStats getCreateCallStats()
-
testOnRelease
public java.util.concurrent.CompletableFuture<java.lang.Boolean> testOnRelease(T entity)
- Specified by:
testOnRelease
in interfaceAsyncPool.LifeCycle<T>
- Overrides:
testOnRelease
in classLifeCycleFilter<T>
-
testAfterIdle
public java.util.concurrent.CompletableFuture<java.lang.Boolean> testAfterIdle(T entity)
- Specified by:
testAfterIdle
in interfaceAsyncPool.LifeCycle<T>
- Overrides:
testAfterIdle
in classLifeCycleFilter<T>
-
getTestCallStats
public CallTracker.CallStats getTestCallStats()
-
destroy
public java.util.concurrent.CompletableFuture<java.lang.Void> destroy(T entity)
- Specified by:
destroy
in interfaceAsyncPool.LifeCycle<T>
- Overrides:
destroy
in classLifeCycleFilter<T>
-
getDestroyCallStats
public CallTracker.CallStats getDestroyCallStats()
-
-