Class DistributedReadWriteLock
- java.lang.Object
-
- org.apache.accumulo.fate.zookeeper.DistributedReadWriteLock
-
- All Implemented Interfaces:
ReadWriteLock
public class DistributedReadWriteLock extends Object implements ReadWriteLock
A ReadWriteLock that can be implemented in ZooKeeper. Features the ability to store data with the lock, and recover the lock using that data to find the lock.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDistributedReadWriteLock.QueueLock
-
Constructor Summary
Constructors Constructor Description DistributedReadWriteLock(DistributedReadWriteLock.QueueLock qlock, byte[] data)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LockreadLock()static LockrecoverLock(DistributedReadWriteLock.QueueLock qlock, byte[] data)LockwriteLock()
-
-
-
Constructor Detail
-
DistributedReadWriteLock
public DistributedReadWriteLock(DistributedReadWriteLock.QueueLock qlock, byte[] data)
-
-
Method Detail
-
recoverLock
public static Lock recoverLock(DistributedReadWriteLock.QueueLock qlock, byte[] data)
-
readLock
public Lock readLock()
- Specified by:
readLockin interfaceReadWriteLock
-
writeLock
public Lock writeLock()
- Specified by:
writeLockin interfaceReadWriteLock
-
-