Class CheckedLockInternalsDriver
java.lang.Object
org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver
com.complexible.common.curator.framework.locks.CheckedLockInternalsDriver
- All Implemented Interfaces:
org.apache.curator.framework.recipes.locks.LockInternalsDriver,org.apache.curator.framework.recipes.locks.LockInternalsSorter
public class CheckedLockInternalsDriver
extends org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver
A
StandardLockInternalsDriver that refuses to hand Curator a null lock node.
createsTheLock returns null when its retry loop gives up. Curator's retry loop is thread-local
and shared with nested calls (CURATOR-559), so a nested loop finishing on this thread can end the outer one
early. LockInternals.internalLockLoop then dereferences it, NPEs, and its finally block
replaces the NPE with IllegalArgumentException: Path cannot be null out of
deleteOurPath(null) -- so the symptom points at Curator's cleanup, not the create that failed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatesTheLock(org.apache.curator.framework.CuratorFramework theClient, String thePath, byte[] theLockNodeBytes) Methods inherited from class org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver
fixForSorting, getSortingSequence, getsTheLock, standardFixForSorting
-
Constructor Details
-
CheckedLockInternalsDriver
public CheckedLockInternalsDriver()
-
-
Method Details
-
createsTheLock
public String createsTheLock(org.apache.curator.framework.CuratorFramework theClient, String thePath, byte[] theLockNodeBytes) throws Exception - Specified by:
createsTheLockin interfaceorg.apache.curator.framework.recipes.locks.LockInternalsDriver- Overrides:
createsTheLockin classorg.apache.curator.framework.recipes.locks.StandardLockInternalsDriver- Throws:
Exception
-