org.apache.tomcat.util.collections
Class SimplePool
java.lang.Object
org.apache.tomcat.util.collections.SimplePool
public final class SimplePool
extends java.lang.Object
Simple object pool. Based on ThreadPool and few other classes
The pool will ignore overflow and return null if empty.
- Gal Shachor
- Costin Manolache
Object | get() - Get an object from the pool, null if the pool is empty.
|
int | getCount() - Number of object in the pool
|
int | getMax() - Return the size of the pool
|
void | put(Object o) - Add the object to the pool, silent nothing if the pool is full
|
void | set(Object o)
|
void | shutdown()
|
DEFAULT_SIZE
public static final int DEFAULT_SIZE
- 32
SimplePool
public SimplePool()
SimplePool
public SimplePool(int size)
SimplePool
public SimplePool(int size,
int max)
get
public Object get()
Get an object from the pool, null if the pool is empty.
getCount
public int getCount()
Number of object in the pool
getMax
public int getMax()
Return the size of the pool
put
public void put(Object o)
Add the object to the pool, silent nothing if the pool is full
set
public void set(Object o)
shutdown
public void shutdown()
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.