| java.lang.Object org.apache.velocity.util.SimplePool
SimplePool | final public class SimplePool (Code) | | Simple object pool. Based on ThreadPool and few other classes
The pool will ignore overflow and return null if empty.
author: Gal Shachor author: Costin author: Geir Magnusson Jr. version: $Id: SimplePool.java 463298 2006-10-12 16:10:32Z henning $ |
SimplePool | public SimplePool(int max)(Code) | | Parameters: max - |
get | public Object get()(Code) | | Get an object from the pool, null if the pool is empty.
The object from the pool. |
getMax | public int getMax()(Code) | | Return the size of the pool
The pool size. |
getPool | Object[] getPool()(Code) | | for testing purposes, so we can examine the pool
Array of Objects in the pool. |
put | public void put(Object o)(Code) | | Add the object to the pool, silent nothing if the pool is full
Parameters: o - |
|
|