Class KeyLocker<K>

java.lang.Object
org.apache.hadoop.hbase.util.KeyLocker<K>

@Private public class KeyLocker<K> extends Object
A utility class to manage a set of locks. Each lock is identified by a String which serves as a key. Typical usage is:
 class Example {
   private final static KeyLocker<String> locker = new Locker<String>();

   public void foo(String s) {
     Lock lock = locker.acquireLock(s);
     try {
       // whatever
     } finally {
       lock.unlock();
     }
   }
 }