@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,
java.lang.String znode,
byte[] metadata,
InterProcessLock.MetadataHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getLockPath(java.lang.String createdZNode,
java.util.List<java.lang.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, java.lang.String znode, byte[] metadata, InterProcessLock.MetadataHandler handler)
protected java.lang.String getLockPath(java.lang.String createdZNode,
java.util.List<java.lang.String> children)
throws java.io.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 ZNodejava.io.IOException