|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.parser.util.SimpleLock
The SimpleLock
is a simple implementation of an
exclusive lock. It does not support nested lock/unlock pairs from
the same thread. It does not guarantee fairness. It does not
detect thread abandonment (i.e. thread exits while holding lock.)
It does not verify that a thread actually holds the lock when it
tries to unlock the lock.
Constructor Summary | |
SimpleLock()
Construct a new SimpleLock instance. |
Method Summary | |
boolean |
isLocked()
Fetches whether the lock is currently being held. |
void |
lock()
Request the lock. |
void |
unlock()
Releases the lock. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleLock()
SimpleLock
instance. The lock
is created in the unlocked state by default.
Method Detail |
public void lock()
public void unlock()
public boolean isLocked()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.