Class PoolMap.ThreadLocalPool<R>

java.lang.Object
org.apache.hadoop.hbase.util.PoolMap.ThreadLocalPool<R>
Type Parameters:
R - the type of the resource
All Implemented Interfaces:
PoolMap.Pool<R>
Enclosing class:
PoolMap<K,V>

static class PoolMap.ThreadLocalPool<R> extends Object implements PoolMap.Pool<R>
The ThreadLocalPool represents a PoolMap.Pool that works similarly to ThreadLocal class. It essentially binds the resource to the thread from which it is accessed. It doesn't remove resources when a thread exits, those resources must be closed manually.

Note that the size of the pool is essentially bounded by the number of threads that add resources to this pool.