|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.parser.util.SimpleLock
public final class 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()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |