public class HashedWheelTimeout extends AbstractTimeout implements Runnable
deadline, task, timerST_CANCELLED, ST_EXPIRED, ST_INIT| 构造器和说明 |
|---|
HashedWheelTimeout(HashedWheelTimer timer,
TimerTask task,
long deadline) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
cancel()
Attempts to cancel the
TimerTask associated with this handle. |
TimerTask |
task()
Returns the
TimerTask which is associated with this handle. |
Timer |
timer()
Returns the
Timer that created this handle. |
String |
toString() |
compareAndSetState, executeTask, isCancelled, isExpired, run, statepublic HashedWheelTimeout(HashedWheelTimer timer, TimerTask task, long deadline)
public Timer timer()
TimeoutTimer that created this handle.timer 在接口中 Timeouttimer 在类中 AbstractTimeoutpublic TimerTask task()
TimeoutTimerTask which is associated with this handle.task 在接口中 Timeouttask 在类中 AbstractTimeoutpublic boolean cancel()
TimeoutTimerTask associated with this handle.
If the task has been executed or cancelled already, it will return with
no side effect.Copyright © 2022. All rights reserved.