|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.velocity.util.SimplePool
Simple object pool. Based on ThreadPool and few other classes The pool will ignore overflow and return null if empty.
Field Summary | |
private int |
current
index of previous to next free slot |
private int |
max
max amount of objects to be managed set via CTOR |
private java.lang.Object[] |
pool
|
Constructor Summary | |
SimplePool(int max)
|
Method Summary | |
java.lang.Object |
get()
Get an object from the pool, null if the pool is empty. |
int |
getMax()
Return the size of the pool |
void |
put(java.lang.Object o)
Add the object to the pool, silent nothing if the pool is full |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.Object[] pool
private int max
private int current
Constructor Detail |
public SimplePool(int max)
Method Detail |
public void put(java.lang.Object o)
public java.lang.Object get()
public int getMax()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |