|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpu.patterns.common.ReentrantLock
| Constructor Summary | |
ReentrantLock()
Default constructor. |
|
| Method Summary | |
java.lang.Thread |
getOwner()
Returns the thread owner of this ReentrantLock. |
void |
lock()
Acquires the lock. |
java.lang.String |
toString()
|
boolean |
tryLock()
Acquires the lock only if it not held by another thread. |
void |
unlock()
Attempts to release this lock. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ReentrantLock()
| Method Detail |
public void lock()
lock in interface IReentrantLockpublic boolean tryLock()
tryLock in interface IReentrantLocktrue if the lock was free and was acquired by the
current thread, or the lock was already held by the current
thread; false otherwise.public void unlock()
unlock() as lock() have been performed
on this ReentrantLock by the current thread.
throws IllegalMonitorStateExeception if the current thread does not hold
this lock.
unlock in interface IReentrantLockpublic java.lang.String toString()
public java.lang.Thread getOwner()
ReentrantLock.
getOwner in interface IReentrantLock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||