| |
|
| java.lang.Object org.apache.xml.utils.ObjectPool
ObjectPool | public class ObjectPool implements java.io.Serializable(Code) | | Pool of object of a given type to pick from to help memory usage
|
serialVersionUID | final static long serialVersionUID(Code) | | |
ObjectPool | public ObjectPool(Class type)(Code) | | Constructor ObjectPool
Parameters: type - Type of objects for this pool |
ObjectPool | public ObjectPool(String className)(Code) | | Constructor ObjectPool
Parameters: className - Fully qualified name of the type of objects for this pool. |
ObjectPool | public ObjectPool(Class type, int size)(Code) | | Constructor ObjectPool
Parameters: type - Type of objects for this pool Parameters: size - Size of vector to allocate |
ObjectPool | public ObjectPool()(Code) | | Constructor ObjectPool
|
freeInstance | public synchronized void freeInstance(Object obj)(Code) | | Add an instance of the given object to the pool
Parameters: obj - Object to add. |
getInstance | public synchronized Object getInstance()(Code) | | Get an instance of the given object in this pool
An instance of the given object |
getInstanceIfFree | public synchronized Object getInstanceIfFree()(Code) | | Get an instance of the given object in this pool if available
an instance of the given object if available or null |
|
|
|