Class LifeCycleFilter<T>
- java.lang.Object
-
- com.linkedin.alpini.base.pool.impl.LifeCycleFilter<T>
-
- All Implemented Interfaces:
AsyncPool.LifeCycle<T>
- Direct Known Subclasses:
LifeCycleStatsCollector
,RateLimitedCreateLifeCycle
public class LifeCycleFilter<T> extends java.lang.Object implements AsyncPool.LifeCycle<T>
-
-
Constructor Summary
Constructors Constructor Description LifeCycleFilter(AsyncPool.LifeCycle<T> lifeCycle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<T>
create()
java.util.concurrent.CompletableFuture<java.lang.Void>
destroy(T entity)
boolean
isWrapperFor(java.lang.Class<?> iface)
java.util.concurrent.CompletableFuture<java.lang.Boolean>
testAfterIdle(T entity)
java.util.concurrent.CompletableFuture<java.lang.Boolean>
testOnRelease(T entity)
<W> W
unwrap(java.lang.Class<W> iface)
-
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
-
LifeCycleFilter
public LifeCycleFilter(AsyncPool.LifeCycle<T> lifeCycle)
-
-
Method Detail
-
create
public java.util.concurrent.CompletableFuture<T> create()
- Specified by:
create
in interfaceAsyncPool.LifeCycle<T>
-
testOnRelease
public java.util.concurrent.CompletableFuture<java.lang.Boolean> testOnRelease(T entity)
- Specified by:
testOnRelease
in interfaceAsyncPool.LifeCycle<T>
-
testAfterIdle
public java.util.concurrent.CompletableFuture<java.lang.Boolean> testAfterIdle(T entity)
- Specified by:
testAfterIdle
in interfaceAsyncPool.LifeCycle<T>
-
destroy
public java.util.concurrent.CompletableFuture<java.lang.Void> destroy(T entity)
- Specified by:
destroy
in interfaceAsyncPool.LifeCycle<T>
-
unwrap
public <W> W unwrap(java.lang.Class<W> iface)
- Specified by:
unwrap
in interfaceAsyncPool.LifeCycle<T>
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface)
- Specified by:
isWrapperFor
in interfaceAsyncPool.LifeCycle<T>
-
-