Class IdReadWriteLock<T>

java.lang.Object
org.apache.hadoop.hbase.util.IdReadWriteLock<T>

@Private public class IdReadWriteLock<T> extends Object
Allows multiple concurrent clients to lock on a numeric id with ReentrantReadWriteLock. The intended usage for read lock is as follows:
 ReentrantReadWriteLock lock = idReadWriteLock.getLock(id);
 try {
   lock.readLock().lock();
   // User code.
 } finally {
   lock.readLock().unlock();
 }
 
For write lock, use lock.writeLock()