Class RateLimitedCreateLifeCycle<T>
- java.lang.Object
-
- com.linkedin.alpini.base.pool.impl.LifeCycleFilter<T>
-
- com.linkedin.alpini.base.pool.impl.RateLimitedCreateLifeCycle<T>
-
- All Implemented Interfaces:
AsyncPool.LifeCycle<T>
public class RateLimitedCreateLifeCycle<T> extends LifeCycleFilter<T>
-
-
Constructor Summary
Constructors Constructor Description RateLimitedCreateLifeCycle(AsyncPool.LifeCycle<T> lifeCycle, java.util.concurrent.ScheduledExecutorService executor, long minimumTimeDelay, long maximumTimeDelay, long timeIncrement, java.util.concurrent.TimeUnit unit)
-
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)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
-
RateLimitedCreateLifeCycle
public RateLimitedCreateLifeCycle(@Nonnull AsyncPool.LifeCycle<T> lifeCycle, @Nonnull java.util.concurrent.ScheduledExecutorService executor, long minimumTimeDelay, long maximumTimeDelay, long timeIncrement, @Nonnull java.util.concurrent.TimeUnit unit)
-
-
Method Detail
-
create
public java.util.concurrent.CompletableFuture<T> create()
- Specified by:
createin interfaceAsyncPool.LifeCycle<T>- Overrides:
createin classLifeCycleFilter<T>
-
testOnRelease
public java.util.concurrent.CompletableFuture<java.lang.Boolean> testOnRelease(T entity)
- Specified by:
testOnReleasein interfaceAsyncPool.LifeCycle<T>- Overrides:
testOnReleasein classLifeCycleFilter<T>
-
testAfterIdle
public java.util.concurrent.CompletableFuture<java.lang.Boolean> testAfterIdle(T entity)
- Specified by:
testAfterIdlein interfaceAsyncPool.LifeCycle<T>- Overrides:
testAfterIdlein classLifeCycleFilter<T>
-
destroy
public java.util.concurrent.CompletableFuture<java.lang.Void> destroy(T entity)
- Specified by:
destroyin interfaceAsyncPool.LifeCycle<T>- Overrides:
destroyin classLifeCycleFilter<T>
-
-