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.CycleDetectingLock
CycleDetectingLockFactory.LockGraphNode
associated with this lock.public boolean isAcquiredByCurrentThread()
isAcquiredByCurrentThread
in interface CycleDetectingLockFactory.CycleDetectingLock
true
if the current thread has acquired this lock.public void lock()
lock
in interface java.util.concurrent.locks.Lock
lock
in class java.util.concurrent.locks.ReentrantLock
public void lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly
in interface java.util.concurrent.locks.Lock
lockInterruptibly
in class java.util.concurrent.locks.ReentrantLock
java.lang.InterruptedException
public boolean tryLock()
tryLock
in interface java.util.concurrent.locks.Lock
tryLock
in class java.util.concurrent.locks.ReentrantLock
public boolean tryLock(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock
in interface java.util.concurrent.locks.Lock
tryLock
in class java.util.concurrent.locks.ReentrantLock
java.lang.InterruptedException
public void unlock()
unlock
in interface java.util.concurrent.locks.Lock
unlock
in class java.util.concurrent.locks.ReentrantLock