public abstract class TimedWait extends Object
| Constructor and Description |
|---|
TimedWait()
Default Constructor.
|
TimedWait(Object obj)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast()
Notify all threads waiting on the object_.
|
abstract boolean |
condition()
Hook method that needs to be implemented by subclasses.
|
void |
signal()
Notify any one thread waiting on the object_.
|
void |
timedWait()
Wait until condition becomes true.
|
void |
timedWait(long milliSec)
Template Method that implements the actual timed wait.
|
public TimedWait()
public TimedWait(Object obj)
obj - The Object that is delegated the wait() call.public abstract boolean condition()
public final void timedWait()
throws InterruptedException
InterruptedException - Interrupted during waitpublic final void timedWait(long milliSec)
throws InterruptedException,
TimeoutException
milliSec - Amount of time to do wait for.InterruptedException - Interrupted during waitTimeoutException - Reached timeout specifiedpublic final void signal()
public final void broadcast()
Copyright © 2005–2025 Onix Solutions. All rights reserved.