|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aicas.jamaica.lang.Wait
public class Wait
Wait provides a handy method to wait for a monitor and ignore all interrupt()s.
| Constructor Summary | |
|---|---|
Wait()
|
|
| Method Summary | |
|---|---|
static void |
join(Thread thread)
Wait for termination of a given thread. |
static void |
sleep(long ms)
Sleep for a given amount of time and ignore all interrupts() or ThreadDeath exceptions. |
static void |
sleep(long ms,
int ns)
Sleep for a given amount of time and ignore all interrupts() or ThreadDeath exceptions. |
static void |
wait(Object obj)
Wait for a notify on a given object using obj.wait() and ignore all interrupts() or ThreadDeath exceptions. |
static void |
wait(Object obj,
long ms)
Wait for a notify on a given object using obj.wait() and ignore all interrupts() or ThreadDeath exceptions. |
static void |
wait(Object obj,
long ms,
int ns)
Wait for a notify on a given object using obj.wait() and ignore all interrupts() or ThreadDeath exceptions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Wait()
| Method Detail |
|---|
public static void wait(Object obj,
long ms,
int ns)
obj - the object to wait for.ms - the timeout in milliseconds, 0 for none.ns - the timeout in nanoseconds, 0 for none.
IllegalMonitorStateException - if the currrent thread did
not enter obj's monitor.
public static void wait(Object obj,
long ms)
obj - the object to wait for.ms - the timeout in milliseconds, 0 for none.
IllegalMonitorStateException - if the currrent thread did
not enter obj's monitor.public static void wait(Object obj)
obj - the object to wait for.
IllegalMonitorStateException - if the currrent thread did
not enter obj's monitor.
public static void sleep(long ms,
int ns)
ms - the timeout in milliseconds.ns - the timeout in nanoseconds.
IllegalArgumentException - if millis or nanos is negative
or nanos is larger than 999999.public static void sleep(long ms)
ms - the timeout in milliseconds.
IllegalArgumentException - if millis is negative.public static void join(Thread thread)
thread - the thread whose termination we are waiting for.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||