|
TrueZIP 6.8.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
interface ReentrantLock
Similar to java.util.concurrent.locks.Lock,
but simplified and adapted to the particular needs of TrueZIP.
The subset of methods common to both this interface and its cousin
in JSE 1.5 is identical in functionality.
However, some other methods have been added here in order to suit
the particular needs of TrueZIP (see ArchiveController).
| Method Summary | |
|---|---|
boolean |
isLocked()
Returns true if and only if the current thread has
acquired this lock. |
void |
lock()
Acquires this lock by the current thread, eventually blocking. |
int |
lockCount()
Returns the number of times the current thread has successfully acquired this lock. |
void |
lockInterruptibly()
Acquires this lock by the current thread unless it is interrupted, eventually blocking. |
boolean |
tryLock()
Acquires this lock if and only if it is available at the time of invocation by the current thread and returns true. |
void |
unlock()
Releases this lock. |
| Method Detail |
|---|
boolean isLocked()
true if and only if the current thread has
acquired this lock.
int lockCount()
void lock()
void lockInterruptibly()
throws InterruptedException
InterruptedExceptionboolean tryLock()
true.
Otherwise, If this lock is not available then false
is returned.
void unlock()
throws IllegalMonitorStateException
IllegalMonitorStateException - If the current thread has not
acquired this lock.
|
TrueZIP 6.8.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||