接口 Timeout
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleancancel()Attempts to cancel theTimerTaskassociated with this handle.booleanisCancelled()Returnstrueif and only if theTimerTaskassociated with this handle has been cancelled.booleanisExpired()Returnstrueif and only if theTimerTaskassociated with this handle has been expired.TimerTasktask()Returns theTimerTaskwhich is associated with this handle.Timertimer()Returns theTimerthat created this handle.
-
-
-
方法详细资料
-
isExpired
boolean isExpired()
Returnstrueif and only if theTimerTaskassociated with this handle has been expired.
-
isCancelled
boolean isCancelled()
Returnstrueif and only if theTimerTaskassociated with this handle has been cancelled.
-
cancel
boolean cancel()
Attempts to cancel theTimerTaskassociated with this handle. If the task has been executed or cancelled already, it will return with no side effect.- 返回:
- True if the cancellation completed successfully, otherwise false
-
-