Package org.jboss.netty.util
Class HashedWheelTimer.HashedWheelTimeout
- java.lang.Object
-
- org.jboss.netty.util.HashedWheelTimer.HashedWheelTimeout
-
- All Implemented Interfaces:
Timeout
- Enclosing class:
- HashedWheelTimer
private static final class HashedWheelTimer.HashedWheelTimeout extends java.lang.Object implements Timeout
-
-
Field Summary
Fields Modifier and Type Field Description (package private) HashedWheelTimer.HashedWheelBucketbucketprivate longdeadline(package private) HashedWheelTimer.HashedWheelTimeoutnext(package private) HashedWheelTimer.HashedWheelTimeoutprev(package private) longremainingRoundsprivate static intST_CANCELLEDprivate static intST_EXPIREDprivate static intST_IN_BUCKETprivate static intST_INITprivate intstateprivate static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<HashedWheelTimer.HashedWheelTimeout>STATE_UPDATERprivate TimerTasktaskprivate HashedWheelTimertimer
-
Constructor Summary
Constructors Constructor Description HashedWheelTimeout(HashedWheelTimer timer, TimerTask task, long deadline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels theTimerTaskassociated with this handle.booleancompareAndSetState(int expected, int state)voidexpire()TimerTaskgetTask()Returns theTimerTaskwhich is associated with this handle.TimergetTimer()Returns theTimerthat created 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.voidremove()intstate()java.lang.StringtoString()HashedWheelTimer.HashedWheelTimeoutvalue()
-
-
-
Field Detail
-
ST_INIT
private static final int ST_INIT
- See Also:
- Constant Field Values
-
ST_IN_BUCKET
private static final int ST_IN_BUCKET
- See Also:
- Constant Field Values
-
ST_CANCELLED
private static final int ST_CANCELLED
- See Also:
- Constant Field Values
-
ST_EXPIRED
private static final int ST_EXPIRED
- See Also:
- Constant Field Values
-
STATE_UPDATER
private static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater<HashedWheelTimer.HashedWheelTimeout> STATE_UPDATER
-
timer
private final HashedWheelTimer timer
-
task
private final TimerTask task
-
deadline
private final long deadline
-
state
private volatile int state
-
remainingRounds
long remainingRounds
-
next
HashedWheelTimer.HashedWheelTimeout next
-
prev
HashedWheelTimer.HashedWheelTimeout prev
-
bucket
HashedWheelTimer.HashedWheelBucket bucket
-
-
Constructor Detail
-
HashedWheelTimeout
HashedWheelTimeout(HashedWheelTimer timer, TimerTask task, long deadline)
-
-
Method Detail
-
getTimer
public Timer getTimer()
Description copied from interface:TimeoutReturns theTimerthat created this handle.
-
getTask
public TimerTask getTask()
Description copied from interface:TimeoutReturns theTimerTaskwhich is associated with this handle.
-
cancel
public void cancel()
Description copied from interface:TimeoutCancels theTimerTaskassociated 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:TimeoutReturnstrueif and only if theTimerTaskassociated with this handle has been cancelled.- Specified by:
isCancelledin interfaceTimeout
-
isExpired
public boolean isExpired()
Description copied from interface:TimeoutReturnstrueif and only if theTimerTaskassociated with this handle has been expired.
-
value
public HashedWheelTimer.HashedWheelTimeout value()
-
expire
public void expire()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-