T - the type of object to put in the poolpublic class ObjectPool<T>
extends java.lang.Object
| Constructor and Description |
|---|
ObjectPool(java.util.function.Supplier<T> supplier,
java.util.function.Consumer<T> consumer) |
| Modifier and Type | Method and Description |
|---|---|
T |
acquire() |
void |
recycle(T item) |