Package org.jppf.utils.concurrent
Class JPPFReentrantLock
java.lang.Object
org.jppf.utils.concurrent.JPPFReentrantLock
- All Implemented Interfaces:
Serializable,Lock
A non-fair lock implementation that allows assigning a readable and identifiable name and
toString().- Author:
- Laurent Cohen
- See Also:
-
Constructor Details
-
JPPFReentrantLock
public JPPFReentrantLock()Creates an instance ofJPPFReentrantLock. -
JPPFReentrantLock
Creates an instance ofJPPFReentrantLock.- Parameters:
name- the name.
-
-
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
-
toString
-