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.HashedWheelBucketprivate final long(package private) HashedWheelTimer.HashedWheelTimeout(package private) HashedWheelTimer.HashedWheelTimeout(package private) longprivate static final intprivate static final intprivate static final intprivate static final intprivate intprivate static final AtomicIntegerFieldUpdater<HashedWheelTimer.HashedWheelTimeout> private final TimerTaskprivate final HashedWheelTimer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels theTimerTaskassociated with this handle.booleancompareAndSetState(int expected, int state) voidexpire()getTask()Returns theTimerTaskwhich is associated with this handle.getTimer()Returns theTimerthat created this handle.booleanReturnstrueif and only if theTimerTaskassociated with this handle has been cancelled.booleanReturnstrueif and only if theTimerTaskassociated with this handle has been expired.voidremove()intstate()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
-
getTask
-
cancel
-
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
-
value
-
expire
public void expire() -
toString
-