@InterfaceAudience.Private public class ZKInterProcessWriteLock extends ZKInterProcessLockBase
ZKInterProcessLockBase.AcquiredLock, ZKInterProcessLockBase.ZNodeComparatorInterProcessLock.MetadataHandleracquiredLock, childZNode, fullyQualifiedZNode, handler, metadata, parentLockNode, READ_LOCK_CHILD_NODE_PREFIX, WRITE_LOCK_CHILD_NODE_PREFIX, zkWatcher| Constructor and Description |
|---|
ZKInterProcessWriteLock(ZooKeeperWatcher zooKeeperWatcher,
String znode,
byte[] metadata,
InterProcessLock.MetadataHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getLockPath(String createdZNode,
List<String> children)
Determine based on a list of children under a ZNode, whether or not a
process which created a specified ZNode has obtained a lock.
|
acquire, handleLockMetadata, handleLockMetadata, isChildOfSameType, isChildReadLock, isChildWriteLock, reapAllLocks, reapExpiredLocks, release, tryAcquire, updateAcquiredLock, visitLockspublic ZKInterProcessWriteLock(ZooKeeperWatcher zooKeeperWatcher, String znode, byte[] metadata, InterProcessLock.MetadataHandler handler)
protected String getLockPath(String createdZNode, List<String> children) throws IOException
getLockPath in class ZKInterProcessLockBasecreatedZNode - The ZNode created by the process attempting to acquire
a lockchildren - List of all child ZNodes under the lock's parent ZNodeIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.