public class ScheduledTimeout extends AbstractTimeout
deadline, task, timerST_CANCELLED, ST_EXPIRED, ST_INIT| 构造器和说明 |
|---|
ScheduledTimeout(ScheduledExecutorTimer timer,
TimerTask timerTask,
long deadline) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
cancel()
Attempts to cancel the
TimerTask associated with this handle. |
void |
executeTask() |
boolean |
isCancelled()
Returns
true if and only if the TimerTask associated
with this handle has been cancelled. |
void |
setFuture(ScheduledFuture future) |
compareAndSetState, isExpired, run, state, task, timerpublic ScheduledTimeout(ScheduledExecutorTimer timer, TimerTask timerTask, long deadline)
public void setFuture(ScheduledFuture future)
public boolean isCancelled()
Timeouttrue if and only if the TimerTask associated
with this handle has been cancelled.isCancelled 在接口中 TimeoutisCancelled 在类中 AbstractTimeoutpublic void executeTask()
executeTask 在类中 AbstractTimeoutCopyright © 2022. All rights reserved.