public class GenericObjectPool<E extends Poolable> extends AbstractPool<E,E> implements ObjectPool<E>
ObjectPool.MemoryMeasure<E>
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
add(E e,
boolean autoDestroyOnFailedToAdd) |
boolean |
add(E e,
long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
add(E e,
long timeout,
java.util.concurrent.TimeUnit unit,
boolean autoDestroyOnFailedToAdd) |
boolean |
contains(E e)
Method contains
|
E |
take()
Retrieves and removes the head of this queue, or returns null if this queue is empty.
|
E |
take(long timeout,
java.util.concurrent.TimeUnit unit) |
public boolean add(E e)
add
in interface ObjectPool<E extends Poolable>
public boolean add(E e, boolean autoDestroyOnFailedToAdd)
add
in interface ObjectPool<E extends Poolable>
public boolean add(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
add
in interface ObjectPool<E extends Poolable>
java.lang.InterruptedException
public boolean add(E e, long timeout, java.util.concurrent.TimeUnit unit, boolean autoDestroyOnFailedToAdd) throws java.lang.InterruptedException
add
in interface ObjectPool<E extends Poolable>
java.lang.InterruptedException
public E take()
ObjectPool
take
in interface ObjectPool<E extends Poolable>
public E take(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
take
in interface ObjectPool<E extends Poolable>
java.lang.InterruptedException
public boolean contains(E e)
ObjectPool
contains
in interface ObjectPool<E extends Poolable>