org.mortbay.util
public class Pool extends Object implements LifeCycle, Serializable
Version: $Id: Pool.java,v 1.13 2005/08/13 00:01:28 gregwilkins Exp $
Nested Class Summary | |
---|---|
static interface | Pool.PondLife |
Constructor Summary | |
---|---|
Pool() |
Method Summary | |
---|---|
int | available() |
void | dump(String msg) |
Pool.PondLife | get(int timeoutMs) |
Object | getAttribute(String name) |
int | getMaxIdleTimeMs() |
int | getMaxSize() |
int | getMinSize() |
static Pool | getPool(String name) |
Class | getPoolClass() |
String | getPoolName() |
boolean | isStarted() |
void | put(Pool.PondLife pl) |
void | setAttribute(String name, Object value) |
void | setMaxIdleTimeMs(int maxIdleTimeMs) |
void | setMaxSize(int max) |
void | setMinSize(int min) |
void | setPoolClass(Class poolClass) Set the class. |
void | setPoolName(String name) |
void | shrink() |
int | size() |
void | start() |
void | stop() |
Returns: The name of the Pool.
Parameters: poolClass The class
Throws: IllegalStateException If the pool has already been started.
Parameters: name The pool name
Throws: IllegalStateException If the name is already defined.