public class ComponentPool<T extends PooledComponent> extends Object
| Constructor and Description |
|---|
ComponentPool(ComponentFactory<T> componentFactory) |
ComponentPool(ComponentFactory<T> componentFactory,
SimplePoolConfig simplePoolConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
freeSize() |
T |
getComponent() |
int |
poolSize() |
void |
returnComponent(T component) |
public ComponentPool(ComponentFactory<T> componentFactory)
public ComponentPool(ComponentFactory<T> componentFactory, SimplePoolConfig simplePoolConfig)
public T getComponent() throws ComponentPoolException
ComponentPoolExceptionpublic void returnComponent(T component)
public int poolSize()
public int freeSize()
public void close()
throws InterruptedException
InterruptedExceptionCopyright © 2017. All rights reserved.