Package org.jboss.netty.util
Class HashedWheelTimer.HashedWheelTimeout
java.lang.Object
org.jboss.netty.util.HashedWheelTimer.HashedWheelTimeout
- All Implemented Interfaces:
Timeout
- 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 static final int
private int
private static final AtomicIntegerFieldUpdater
<HashedWheelTimer.HashedWheelTimeout> private final TimerTask
private final HashedWheelTimer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancels theTimerTask
associated with this handle.boolean
compareAndSetState
(int expected, int state) void
expire()
getTask()
Returns theTimerTask
which is associated with this handle.getTimer()
Returns theTimer
that created this handle.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.void
remove()
int
state()
toString()
value()
-
Field Details
-
ST_INIT
private static final int ST_INIT- See Also:
-
ST_IN_BUCKET
private static final int ST_IN_BUCKET- 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
-
getTimer
Description copied from interface:Timeout
Returns theTimer
that created this handle. -
getTask
Description copied from interface:Timeout
Returns theTimerTask
which is associated with this handle. -
cancel
public void cancel()Description copied from interface:Timeout
Cancels theTimerTask
associated with this handle. It the task has been executed or cancelled already, it will return with no side effect. -
remove
public 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. -
value
-
expire
public void expire() -
toString
-