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 PoolWithDebugInfo
public int getMaxSize()
getMaxSize
in interface PoolWithDebugInfo
public int getCurrentSize()
getCurrentSize
in interface PoolWithDebugInfo
public boolean isFull()
public void clear()