R- the type of the resource
public class PoolMap.ReusablePool<R> extends ConcurrentLinkedQueue<R> implements PoolMap.Pool<R>
PoolMap.Poolthat builds on the
LinkedListclass. It essentially allows resources to be checked out, at which point it is removed from this pool. When the resource is no longer required, it should be returned to the pool in order to be reused.
maxSize is set to
Integer.MAX_VALUE, then the size of
the pool is unbounded. Otherwise, it caps the number of consumers that can
check out a resource from this pool to the (non-zero positive) value
|Constructor and Description|
|Modifier and Type||Method and Description|
add, addAll, contains, isEmpty, iterator, offer, peek, poll, remove, size, toArray, toArray
containsAll, removeAll, retainAll, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public PoolMap.ReusablePool(int maxSize)
Copyright © 2015 The Apache Software Foundation. All rights reserved.