E - public class GenericObjectPool<E extends Poolable> extends AbstractPool 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,
TimeUnit unit) |
boolean |
add(E e,
long timeout,
TimeUnit unit,
boolean autoDestroyOnFailedToAdd) |
void |
clear()
Clear.
|
void |
close()
Close.
|
boolean |
contains(E e) |
boolean |
equals(Object obj) |
int |
hashCode() |
int |
size() |
E |
take()
Retrieves and removes the head of this queue, or returns null if this queue is empty.
|
E |
take(long timeout,
TimeUnit unit) |
String |
toString() |
void |
vacate()
Vacate.
|
evictionCount, getCapacity, hitCount, isClosed, isEmpty, lock, missCount, putCount, unlockevictionCount, getCapacity, hitCount, isClosed, isEmpty, lock, missCount, putCount, unlockpublic boolean add(E e)
add in interface ObjectPool<E extends Poolable>e - public boolean add(E e, boolean autoDestroyOnFailedToAdd)
add in interface ObjectPool<E extends Poolable>e - autoDestroyOnFailedToAdd - public boolean add(E e, long timeout, TimeUnit unit) throws InterruptedException
add in interface ObjectPool<E extends Poolable>e - timeout - unit - InterruptedException - the interrupted exceptionpublic boolean add(E e, long timeout, TimeUnit unit, boolean autoDestroyOnFailedToAdd) throws InterruptedException
add in interface ObjectPool<E extends Poolable>e - timeout - unit - autoDestroyOnFailedToAdd - InterruptedException - the interrupted exceptionpublic E take()
ObjectPooltake in interface ObjectPool<E extends Poolable>public E take(long timeout, TimeUnit unit) throws InterruptedException
take in interface ObjectPool<E extends Poolable>timeout - unit - InterruptedException - the interrupted exceptionpublic boolean contains(E e)
contains in interface ObjectPool<E extends Poolable>e - public boolean equals(Object obj)
Copyright © 2021. All rights reserved.