Package kilim
Class ReentrantLock
java.lang.Object
java.util.concurrent.locks.ReentrantLock
kilim.ReentrantLock
- All Implemented Interfaces:
Serializable,Lock
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.concurrent.locks.ReentrantLock
getHoldCount, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lockInterruptibly, newCondition, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
locker
Thread locker
-
-
Constructor Details
-
ReentrantLock
public ReentrantLock() -
ReentrantLock
public ReentrantLock(boolean fair)
-
-
Method Details
-
getOwner
- Overrides:
getOwnerin classReentrantLock
-
preLock
- Throws:
Pausable
-
checkPin
protected void checkPin() -
lock
public void lock()- Specified by:
lockin interfaceLock- Overrides:
lockin classReentrantLock
-
tryLock
public boolean tryLock()- Specified by:
tryLockin interfaceLock- Overrides:
tryLockin classReentrantLock
-
tryLock
- Specified by:
tryLockin interfaceLock- Overrides:
tryLockin classReentrantLock- Throws:
InterruptedException
-
unlock
public void unlock()- Specified by:
unlockin interfaceLock- Overrides:
unlockin classReentrantLock
-