org.apache.hadoop.hbase.hbql.impl
Class ElementPool<T extends PoolableElement>

java.lang.Object
  extended by org.apache.hadoop.hbase.hbql.impl.ElementPool<T>
Direct Known Subclasses:
HConnectionPoolImpl, QueryExecutorPoolImpl

public abstract class ElementPool<T extends PoolableElement>
extends Object


Constructor Summary
ElementPool(String name, int maxPoolSize)
           
 
Method Summary
protected  void addElementToPool()
           
 int getCreatedCount()
           
protected  BlockingQueue<T> getElementPool()
           
 int getMaxPoolSize()
           
 String getName()
           
 int getTakenCount()
           
protected abstract  T newElement()
           
 void release(T element)
           
protected  T take()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementPool

public ElementPool(String name,
                   int maxPoolSize)
Method Detail

newElement

protected abstract T newElement()
                                                 throws HBqlException
Throws:
HBqlException

getMaxPoolSize

public int getMaxPoolSize()

getElementPool

protected BlockingQueue<T> getElementPool()

getName

public String getName()

getCreatedCount

public int getCreatedCount()

getTakenCount

public int getTakenCount()

addElementToPool

protected void addElementToPool()
                         throws HBqlException
Throws:
HBqlException

take

protected T take()
                                  throws HBqlException
Throws:
HBqlException

release

public void release(T element)


Copyright © 2011. All Rights Reserved.