org.apache.hadoop.hbase.hbql.impl
Class ElementPool<T extends PoolableElement>
java.lang.Object
org.apache.hadoop.hbase.hbql.impl.ElementPool<T>
- Direct Known Subclasses:
- HConnectionPoolImpl, QueryExecutorPoolImpl
public abstract class ElementPool<T extends PoolableElement>
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementPool
public ElementPool(String name,
int maxPoolSize)
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.