|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.HLocking
public class HLocking
HLocking is a set of lock primitives that does not rely on a
particular thread holding the monitor for an object. This is
especially important when a lock must persist over multiple RPC's
since there is no guarantee that the same Server thread will handle
all the RPC's until the lock is released. Not requiring that the locker
thread is same as unlocking thread is the key distinction between this
class and ReentrantReadWriteLock
.
For each independent entity that needs locking, create a new HLocking instance.
Constructor Summary | |
---|---|
HLocking()
Constructor |
Method Summary | |
---|---|
void |
obtainReadLock()
Caller needs the no-nexclusive read-lock |
void |
obtainWriteLock()
Caller needs the exclusive write-lock |
void |
releaseReadLock()
Caller is finished with the non-exclusive read-lock |
void |
releaseWriteLock()
Caller is finished with the write lock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HLocking()
Method Detail |
---|
public void obtainReadLock()
public void releaseReadLock()
public void obtainWriteLock()
public void releaseWriteLock()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |