Class PoolMap<K,V>

java.lang.Object
org.apache.hadoop.hbase.util.PoolMap<K,V>
Type Parameters:
K - the type of the key to the resource
V - the type of the resource being pooled

@Private public class PoolMap<K,V> extends Object
The PoolMap maps a key to a collection of values, the elements of which are managed by a pool. In effect, that collection acts as a shared pool of resources, access to which is closely controlled as per the semantics of the pool.

In case the size of the pool is set to a non-zero positive number, that is used to cap the number of resources that a pool may contain for any given key. A size of Integer.MAX_VALUE is interpreted as an unbounded pool.

PoolMap is thread-safe. It does not remove elements automatically. Unused resources must be closed and removed explicitly.