public interface BlockingPool<T>
| Modifier and Type | Method and Description | 
|---|---|
int | 
maxSize()  | 
ReferenceCountingResourceHolder<T> | 
take()
Take a resource from the pool, waiting if necessary until an element becomes available. 
 | 
ReferenceCountingResourceHolder<T> | 
take(long timeoutMs)
Take a resource from the pool, waiting up to the
 specified wait time if necessary for an element to become available. 
 | 
ReferenceCountingResourceHolder<List<T>> | 
takeBatch(int elementNum)
Take resources from the pool, waiting if necessary until the elements of the given number become available. 
 | 
ReferenceCountingResourceHolder<List<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()
ReferenceCountingResourceHolder<T> take(long timeoutMs)
timeoutMs - maximum time to wait for a resource, in milliseconds.ReferenceCountingResourceHolder<T> take()
ReferenceCountingResourceHolder<List<T>> takeBatch(int elementNum, long timeoutMs)
elementNum - number of resources to taketimeoutMs - maximum time to wait for resources, in milliseconds.ReferenceCountingResourceHolder<List<T>> takeBatch(int elementNum)
elementNum - number of resources to takeCopyright © 2011–2018. All rights reserved.