nf.fr.eraasoft.pool.impl
Class BlockingQueueObjectPool<T>

java.lang.Object
  extended by nf.fr.eraasoft.pool.impl.AbstractPool<T>
      extended by nf.fr.eraasoft.pool.impl.BlockingQueueObjectPool<T>
Type Parameters:
T -
All Implemented Interfaces:
Controlable, ObjectPool<T>

public abstract class BlockingQueueObjectPool<T>
extends AbstractPool<T>

Object pool implementation based on LinkedBlockingQueue
Use PoolSettings class to obtain an instance of this class

Author:
eddie
See Also:
PoolSettings

Constructor Summary
BlockingQueueObjectPool(PoolableObject<T> poolableObject, PoolSettings<T> settings)
           
 
Method Summary
 T getObj()
           PoolSettings<MyType> poolSettings = ....; MyType myType = poolSettings.pool().getObj();
 
Methods inherited from class nf.fr.eraasoft.pool.impl.AbstractPool
actives, clear, create, destroy, idles, init, remove, returnObj, toString, validateIdles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockingQueueObjectPool

public BlockingQueueObjectPool(PoolableObject<T> poolableObject,
                               PoolSettings<T> settings)
Method Detail

getObj

public T getObj()
         throws PoolException
Description copied from interface: ObjectPool
 PoolSettings<MyType> poolSettings = ....;
                MyType myType = poolSettings.pool().getObj();
          

Returns:
an instance of T object
Throws:
PoolException


Copyright © 2013. All Rights Reserved.