org.smallmind.quorum.pool.component
Class ComponentPool<T extends PooledComponent>

java.lang.Object
  extended by org.smallmind.quorum.pool.component.ComponentPool<T>

public class ComponentPool<T extends PooledComponent>
extends Object


Constructor Summary
ComponentPool(ComponentFactory<T> componentFactory, int size, long acquireWaitTimeMillis)
           
 
Method Summary
 void close()
           
 int freeSize()
           
 T getComponent()
           
 int poolSize()
           
 void returnComponent(T component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentPool

public ComponentPool(ComponentFactory<T> componentFactory,
                     int size,
                     long acquireWaitTimeMillis)
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


Copyright © 2012. All Rights Reserved.