Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS

Class jsync.Event

java.lang.Object
    |
    +----jsync.Event

public class Event
extends java.lang.Object
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

Event

public Event()
Create event with non-signaled initial state.

Event

public Event(boolean initState)
Create event with specified initial state.
Parameters:
initState - initial state of event
Method Detail

waitEvent

public void waitEvent()
Wait until event is set to signaled state.

waitEvent

public boolean waitEvent(long timeout)
Wait during specified amount of time until event is set to signaled state.
Parameters:
timeout - the maximum time to wait in milliseconds.
Returns:
true if event is signaled, false if wait() was terminated due to timeout expiration.

signal

public void signal()
Set event to signaled state. Awoke all waiting threads.

reset

public void reset()
Reset event to non-signaled state.

Contents | Package | Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS