Package io.netty.util
Class HashedWheelTimer.HashedWheelTimeout
java.lang.Object
io.netty.util.HashedWheelTimer.HashedWheelTimeout
- Enclosing class:
HashedWheelTimer
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) HashedWheelTimer.HashedWheelBucket
private final long
(package private) HashedWheelTimer.HashedWheelTimeout
(package private) HashedWheelTimer.HashedWheelTimeout
(package private) long
private static final int
private static final int
private static final int
private int
private static final AtomicIntegerFieldUpdater
<HashedWheelTimer.HashedWheelTimeout> private final TimerTask
private final HashedWheelTimer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel()
Attempts to cancel theTimerTask
associated with this handle.boolean
compareAndSetState
(int expected, int state) void
expire()
boolean
Returnstrue
if and only if theTimerTask
associated with this handle has been cancelled.boolean
Returnstrue
if and only if theTimerTask
associated with this handle has been expired.(package private) void
remove()
void
run()
int
state()
task()
Returns theTimerTask
which is associated with this handle.timer()
Returns theTimer
that created this handle.toString()
-
Field Details
-
ST_INIT
private static final int ST_INIT- See Also:
-
ST_CANCELLED
private static final int ST_CANCELLED- See Also:
-
ST_EXPIRED
private static final int ST_EXPIRED- See Also:
-
STATE_UPDATER
-
timer
-
task
-
deadline
private final long deadline -
state
private volatile int state -
remainingRounds
long remainingRounds -
next
-
prev
-
bucket
-
-
Constructor Details
-
HashedWheelTimeout
HashedWheelTimeout(HashedWheelTimer timer, TimerTask task, long deadline)
-
-
Method Details
-
timer
Description copied from interface:Timeout
Returns theTimer
that created this handle. -
task
Description copied from interface:Timeout
Returns theTimerTask
which is associated with this handle. -
cancel
public boolean cancel()Description copied from interface:Timeout
Attempts to cancel theTimerTask
associated with this handle. If the task has been executed or cancelled already, it will return with no side effect. -
remove
void remove() -
compareAndSetState
public boolean compareAndSetState(int expected, int state) -
state
public int state() -
isCancelled
public boolean isCancelled()Description copied from interface:Timeout
Returnstrue
if and only if theTimerTask
associated with this handle has been cancelled.- Specified by:
isCancelled
in interfaceTimeout
-
isExpired
public boolean isExpired()Description copied from interface:Timeout
Returnstrue
if and only if theTimerTask
associated with this handle has been expired. -
expire
public void expire() -
run
public void run() -
toString
-