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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOwner()protected Collection<Thread>final intprotected Collection<Thread>getWaitingThreads(Condition condition) intgetWaitQueueLength(Condition condition) final booleanhasQueuedThread(Thread thread) final booleanbooleanhasWaiters(Condition condition) booleanbooleanisLocked()protected booleanvoidlock()voidtoString()booleantryLock()booleanvoidunlock()
-
Constructor Details
-
NonFairReentrantLock
public NonFairReentrantLock()
-
-
Method Details
-
lock
public void lock() -
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
unlock
public void unlock() -
newCondition
- Specified by:
newConditionin 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
-