|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.tudelft.simulation.language.concurrent.Monitor
public final class Monitor
In the Java programming language there is a lock associated with every object. The language does not provide a way to perform separate lock and unlock operations; instead, they are implicitly performed by high-level constructs that always arrange to pair such operations correctly. This Monitor class, however, provides separate monitorenter and monitorexit instructions that implement the lock and unlock operations.)
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/language
License of use: Lesser General Public License (LGPL)
, no warranty
| Method Summary | |
|---|---|
static void |
lock(java.lang.Object object)
locks an object for the current thread. |
static void |
lock(java.lang.Object object,
java.lang.Thread requestor)
locks an object for the given requestor. |
static void |
unlock(java.lang.Object object)
unlocks an object locked by the current Thread. |
static void |
unlock(java.lang.Object object,
java.lang.Thread owner)
unlocks an object locked by owner. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void lock(java.lang.Object object)
object - the object to lock
public static void lock(java.lang.Object object,
java.lang.Thread requestor)
object - the object to lock.requestor - the requesting thread.public static void unlock(java.lang.Object object)
object - the object to unlock
public static void unlock(java.lang.Object object,
java.lang.Thread owner)
object - the object to unlock.owner - the owning thread.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||