public class RecyclePool<T> extends java.lang.Object implements PoolWithDebugInfo
RecyclePool will keep track of its own size so that it can be queried to debug pool sizes.| Constructor and Description |
|---|
RecyclePool(java.lang.String name,
int maxSize,
boolean sync) |
| Modifier and Type | Method and Description |
|---|---|
T |
acquire() |
void |
clear() |
int |
getCurrentSize() |
int |
getMaxSize() |
java.lang.String |
getName() |
boolean |
isFull() |
void |
release(T item) |
public T acquire()
public void release(T item)
public java.lang.String getName()
getName in interface PoolWithDebugInfopublic int getMaxSize()
getMaxSize in interface PoolWithDebugInfopublic int getCurrentSize()
getCurrentSize in interface PoolWithDebugInfopublic boolean isFull()
public void clear()