public interface ObjectPool<E extends Poolable> extends Pool<E,E>
Modifier and Type | Interface and Description |
---|---|
static interface |
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) |
boolean add(E e)
e
- boolean add(E e, boolean autoDestroyOnFailedToAdd)
e
- autoDestroyOnFailedToAdd
- boolean add(E e, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
e
- timeout
- unit
- java.lang.InterruptedException
boolean add(E e, long timeout, java.util.concurrent.TimeUnit unit, boolean autoDestroyOnFailedToAdd) throws java.lang.InterruptedException
e
- timeout
- unit
- autoDestroyOnFailedToAdd
- java.lang.InterruptedException
E take()
E take(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
timeout
- unit
- java.lang.InterruptedException
boolean contains(E e)
e
-