Class NonFairReentrantLock
java.lang.Object
org.eclipse.net4j.util.concurrent.NonFairReentrantLock
- All Implemented Interfaces:
Serializable
,Lock
- Direct Known Subclasses:
DelegableReentrantLock
- Since:
- 3.6
- Author:
- Eike Stepper
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getOwner()
protected Collection<Thread>
final int
protected Collection<Thread>
getWaitingThreads
(Condition condition) int
getWaitQueueLength
(Condition condition) final boolean
hasQueuedThread
(Thread thread) final boolean
boolean
hasWaiters
(Condition condition) boolean
boolean
isLocked()
protected boolean
void
lock()
void
toString()
boolean
tryLock()
boolean
void
unlock()
-
Constructor Details
-
NonFairReentrantLock
public NonFairReentrantLock()
-
-
Method Details
-
lock
public void lock() -
lockInterruptibly
- Specified by:
lockInterruptibly
in interfaceLock
- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLock
in interfaceLock
- Throws:
InterruptedException
-
unlock
public void unlock() -
newCondition
- Specified by:
newCondition
in interfaceLock
-
getHoldCount
public int getHoldCount() -
isHeldByCurrentThread
public boolean isHeldByCurrentThread() -
isLocked
public boolean isLocked() -
getOwner
-
hasQueuedThreads
public final boolean hasQueuedThreads() -
hasQueuedThread
-
getQueueLength
public final int getQueueLength() -
hasWaiters
-
getWaitQueueLength
-
toString
-
getQueuedThreads
-
getWaitingThreads
-
isOwner
-