final class CycleDetectingLockFactory.CycleDetectingReentrantLock extends java.util.concurrent.locks.ReentrantLock implements CycleDetectingLockFactory.CycleDetectingLock
| Modifier and Type | Field and Description |
|---|---|
private CycleDetectingLockFactory.LockGraphNode |
lockGraphNode |
| Modifier | Constructor and Description |
|---|---|
private |
CycleDetectingReentrantLock(CycleDetectingLockFactory.LockGraphNode lockGraphNode,
boolean fair) |
| Modifier and Type | Method and Description |
|---|---|
CycleDetectingLockFactory.LockGraphNode |
getLockGraphNode() |
boolean |
isAcquiredByCurrentThread() |
void |
lock() |
void |
lockInterruptibly() |
boolean |
tryLock() |
boolean |
tryLock(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
unlock() |
private final CycleDetectingLockFactory.LockGraphNode lockGraphNode
private CycleDetectingReentrantLock(CycleDetectingLockFactory.LockGraphNode lockGraphNode, boolean fair)
public CycleDetectingLockFactory.LockGraphNode getLockGraphNode()
getLockGraphNode in interface CycleDetectingLockFactory.CycleDetectingLockCycleDetectingLockFactory.LockGraphNode associated with this lock.public boolean isAcquiredByCurrentThread()
isAcquiredByCurrentThread in interface CycleDetectingLockFactory.CycleDetectingLocktrue if the current thread has acquired this lock.public void lock()
lock in interface java.util.concurrent.locks.Locklock in class java.util.concurrent.locks.ReentrantLockpublic void lockInterruptibly()
throws java.lang.InterruptedException
lockInterruptibly in interface java.util.concurrent.locks.LocklockInterruptibly in class java.util.concurrent.locks.ReentrantLockjava.lang.InterruptedExceptionpublic boolean tryLock()
tryLock in interface java.util.concurrent.locks.LocktryLock in class java.util.concurrent.locks.ReentrantLockpublic boolean tryLock(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
tryLock in interface java.util.concurrent.locks.LocktryLock in class java.util.concurrent.locks.ReentrantLockjava.lang.InterruptedExceptionpublic void unlock()
unlock in interface java.util.concurrent.locks.Lockunlock in class java.util.concurrent.locks.ReentrantLock