public class RecyclePool<T> extends 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(String name,
int maxSize,
boolean sync) |
| Modifier and Type | Method and Description |
|---|---|
T |
acquire() |
void |
clear() |
int |
getCurrentSize() |
int |
getMaxSize() |
String |
getName() |
boolean |
isFull() |
void |
release(T item) |
public RecyclePool(String name, int maxSize, boolean sync)
public T acquire()
public void release(T item)
public String getName()
getName in interface PoolWithDebugInfopublic int getMaxSize()
getMaxSize in interface PoolWithDebugInfopublic int getCurrentSize()
getCurrentSize in interface PoolWithDebugInfopublic boolean isFull()
public void clear()