public interface BlockingPool<T>
Modifier and Type | Method and Description |
---|---|
int |
maxSize() |
List<ReferenceCountingResourceHolder<T>> |
takeBatch(int elementNum)
Take resources from the pool, waiting if necessary until the elements of the given number become available.
|
List<ReferenceCountingResourceHolder<T>> |
takeBatch(int elementNum,
long timeoutMs)
Take resources from the pool, waiting up to the
specified wait time if necessary for elements of the given number to become available.
|
int maxSize()
List<ReferenceCountingResourceHolder<T>> takeBatch(int elementNum, long timeoutMs)
elementNum
- number of resources to taketimeoutMs
- maximum time to wait for resources, in milliseconds.elementNum
resources aren't available.List<ReferenceCountingResourceHolder<T>> takeBatch(int elementNum)
elementNum
- number of resources to takeelementNum
resources aren't available.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.