Class FateLock
- java.lang.Object
-
- org.apache.accumulo.core.fate.zookeeper.FateLock
-
- All Implemented Interfaces:
DistributedReadWriteLock.QueueLock
public class FateLock extends Object implements DistributedReadWriteLock.QueueLock
A persistent lock mechanism in ZooKeeper used for locking tables during FaTE operations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FateLock.FateLockPath
-
Constructor Summary
Constructors Constructor Description FateLock(ZooReaderWriter zrw, FateLock.FateLockPath path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
addEntry(byte[] data)
SortedMap<Long,byte[]>
getEarlierEntries(long entry)
static FateLock.FateLockPath
path(String path)
void
removeEntry(long entry)
static List<String>
validateAndSort(FateLock.FateLockPath path, List<String> children)
Validate and sort child nodes at this lock path by the lock prefix
-
-
-
Constructor Detail
-
FateLock
public FateLock(ZooReaderWriter zrw, FateLock.FateLockPath path)
-
-
Method Detail
-
path
public static FateLock.FateLockPath path(String path)
-
addEntry
public long addEntry(byte[] data)
- Specified by:
addEntry
in interfaceDistributedReadWriteLock.QueueLock
-
getEarlierEntries
public SortedMap<Long,byte[]> getEarlierEntries(long entry)
- Specified by:
getEarlierEntries
in interfaceDistributedReadWriteLock.QueueLock
-
removeEntry
public void removeEntry(long entry)
- Specified by:
removeEntry
in interfaceDistributedReadWriteLock.QueueLock
-
validateAndSort
public static List<String> validateAndSort(FateLock.FateLockPath path, List<String> children)
Validate and sort child nodes at this lock path by the lock prefix
-
-