|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface implemented by classes that need the ability to wait for a testable event to occur or state to be reached without incurring the expense of another thread to poll for the event/state. When it is time to wait for an event, the implementer of this interface calls GenericPoller.wait() specifying the interval and number of retries. At each interval, isDone() is called. The implementer tests for event completion during that call. If isDone() returns true, then done(true) is called. If isDone() returns false, and the specified number of retries have occurred, then done(false) is called. In either case, the GenericWaiter is removed from the GenericPoller's list.
Method Summary | |
---|---|
void |
done(boolean complete)
Method called by GenericPoller once the event has occurred or the number of retries specified for this GenericWaiter have been attempted. |
boolean |
isDone()
Method called by GenericPoller to test if the event that this GenericWaiter is waiting for has occurred. |
Method Detail |
public boolean isDone()
public void done(boolean complete)
complete
- true if the event has occurred (i.e. true was returned
from an isDone() call), false if the the specified number
of retries have been attempted without getting isDone=true
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |