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 interface
DistributedReadWriteLock.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 Lock
readLock()
static Lock
recoverLock(DistributedReadWriteLock.QueueLock qlock, byte[] data)
Lock
writeLock()
-
-
-
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:
readLock
in interfaceReadWriteLock
-
writeLock
public Lock writeLock()
- Specified by:
writeLock
in interfaceReadWriteLock
-
-