|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.jetty.util.Pool
public class Pool
A pool of Objects.
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()
Start the LifeCycle. |
void |
stop()
Stop the LifeCycle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pool()
Method Detail |
---|
public static Pool getPool(String name)
public String getPoolName()
public void setPoolName(String name) throws IllegalStateException
name
- The pool name
IllegalStateException
- If the name is already defined.public void setPoolClass(Class poolClass) throws IllegalStateException
poolClass
- The class
IllegalStateException
- If the pool has already
been started.public Class getPoolClass()
public int getMinSize()
public void setMinSize(int min)
public int getMaxSize()
public void setMaxSize(int max)
public int getMaxIdleTimeMs()
public void setMaxIdleTimeMs(int maxIdleTimeMs)
public void setAttribute(String name, Object value)
public Object getAttribute(String name)
public boolean isStarted()
isStarted
in interface LifeCycle
public int size()
public int available()
public void start() throws Exception
LifeCycle
start
in interface LifeCycle
Exception
- An arbitrary exception may be thrown.public void stop() throws InterruptedException
LifeCycle
stop
in interface LifeCycle
InterruptedException
- Stopping a lifecycle is rarely atomic
and may be interrupted by another thread. If this happens
InterruptedException is throw and the component will be in an
indeterminant state and should probably be discarded.public Pool.PondLife get(int timeoutMs) throws Exception
Exception
public void put(Pool.PondLife pl) throws InterruptedException
InterruptedException
public void shrink() throws InterruptedException
InterruptedException
public void dump(String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |