| java.lang.Object org.mortbay.thread.Timeout
Timeout | public class Timeout (Code) | | Timeout queue.
This class implements a timeout queue for timers that are at least as likely to be cancelled as they are to expire.
Unlike the util timeout class, the duration of the timouts is shared by all scheduled tasks and if the duration
is changed, this affects all scheduled tasks.
The nested class Task should be extended by users of this class to obtain call back notification of
expiries.
author: gregw |
Inner Class :public static class Task | |
Constructor Summary | |
public | Timeout() |
cancelAll | public void cancelAll()(Code) | | |
expired | public Task expired()(Code) | | |
getDuration | public long getDuration()(Code) | | Returns the duration. |
getNow | public long getNow()(Code) | | |
getTimeToNext | public long getTimeToNext()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
schedule | public void schedule(Task task)(Code) | | |
schedule | public void schedule(Task task, long delay)(Code) | | |
setDuration | public void setDuration(long duration)(Code) | | Parameters: duration - The duration to set. |
setNow | public void setNow()(Code) | | |
setNow | public void setNow(long now)(Code) | | |
|
|