Package com.yandex.ydb.table.impl.pool
Class FixedAsyncPool<T>
- java.lang.Object
-
- com.yandex.ydb.table.impl.pool.FixedAsyncPool<T>
-
-
Constructor Summary
Constructors Constructor Description FixedAsyncPool(PooledObjectHandler<T> handler, int minSize, int maxSize, int waitQueueMaxSize, long keepAliveTimeMillis, long maxIdleTimeMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<T>acquire(Duration timeout)Zero timeout will be treated as "return object immediately or fail".voidclose()intgetAcquiredCount()intgetIdleCount()intgetMaxSize()intgetMinSize()intgetPendingAcquireCount()voidrelease(T object)
-
-
-
Constructor Detail
-
FixedAsyncPool
public FixedAsyncPool(PooledObjectHandler<T> handler, int minSize, int maxSize, int waitQueueMaxSize, long keepAliveTimeMillis, long maxIdleTimeMillis)
-
-
Method Detail
-
getMinSize
public int getMinSize()
-
getMaxSize
public int getMaxSize()
-
getAcquiredCount
public int getAcquiredCount()
- Specified by:
getAcquiredCountin interfaceAsyncPool<T>
-
getIdleCount
public int getIdleCount()
- Specified by:
getIdleCountin interfaceAsyncPool<T>
-
getPendingAcquireCount
public int getPendingAcquireCount()
- Specified by:
getPendingAcquireCountin interfaceAsyncPool<T>
-
acquire
public CompletableFuture<T> acquire(Duration timeout)
Description copied from interface:AsyncPoolZero timeout will be treated as "return object immediately or fail".
-
-