public class SimpleObjectPool<T extends AbstractPooledObject>
extends java.lang.Object
| Constructor and Description |
|---|
SimpleObjectPool(PooledObjectFactory<T> objectFactory,
int poolSize,
int maxWaitTime,
int maxLifeTime,
int maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
T |
borrowObject() |
void |
close() |
void |
execute(PooledObjectConsumer<T> consumer) |
void |
invalidateObject(T pooledObject) |
void |
returnObject(T pooledObject) |
public SimpleObjectPool(PooledObjectFactory<T> objectFactory, int poolSize, int maxWaitTime, int maxLifeTime, int maxIdleTime)
public void execute(PooledObjectConsumer<T> consumer) throws java.lang.Exception
java.lang.Exceptionpublic T borrowObject() throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void returnObject(T pooledObject)
public void invalidateObject(T pooledObject)
public void close()