Package org.smallmind.quorum.pool.simple
Class ComponentPool<T extends PooledComponent>
- java.lang.Object
-
- org.smallmind.quorum.pool.Pool
-
- org.smallmind.quorum.pool.simple.ComponentPool<T>
-
public class ComponentPool<T extends PooledComponent> extends Pool
-
-
Constructor Summary
Constructors Constructor Description ComponentPool(ComponentFactory<T> componentFactory)ComponentPool(ComponentFactory<T> componentFactory, SimplePoolConfig simplePoolConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intfreeSize()TgetComponent()intpoolSize()voidreturnComponent(T component)
-
-
-
Constructor Detail
-
ComponentPool
public ComponentPool(ComponentFactory<T> componentFactory)
-
ComponentPool
public ComponentPool(ComponentFactory<T> componentFactory, SimplePoolConfig simplePoolConfig)
-
-
Method Detail
-
getComponent
public T getComponent() throws ComponentPoolException
- Throws:
ComponentPoolException
-
returnComponent
public void returnComponent(T component)
-
poolSize
public int poolSize()
-
freeSize
public int freeSize()
-
close
public void close() throws InterruptedException- Throws:
InterruptedException
-
-