|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsync.Event
Event is synchronization object which can be either in signaled or
non-signaled state. Event is set to signaled state by signal()
method and remains in this state until reset()
method will be
invoked. Setting event to signaled state will awoke all waiting threads.
Constructor Summary | |
Event()
Create event with non-signaled initial state. |
|
Event(boolean initState)
Create event with specified initial state. |
Method Summary | |
void |
reset()
Reset event to non-signaled state. |
void |
signal()
Set event to signaled state. |
void |
waitEvent()
Wait until event is set to signaled state. |
boolean |
waitEvent(long timeout)
Wait during specified amount of time until event is set to signaled state. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Event()
public Event(boolean initState)
initState
- initial state of eventMethod Detail |
public void waitEvent()
public boolean waitEvent(long timeout)
timeout
- the maximum time to wait in milliseconds.
true
if event is signaled, false
if wait()
was terminated due to timeout expiration.public void signal()
public void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |