Class HashedWheelTimer.HashedWheelTimeout

java.lang.Object
io.netty.util.HashedWheelTimer.HashedWheelTimeout
All Implemented Interfaces:
Timeout, java.lang.Runnable
Enclosing class:
HashedWheelTimer

private static final class HashedWheelTimer.HashedWheelTimeout extends java.lang.Object implements Timeout, java.lang.Runnable
  • Field Details

  • Constructor Details

  • Method Details

    • timer

      public Timer timer()
      Description copied from interface: Timeout
      Returns the Timer that created this handle.
      Specified by:
      timer in interface Timeout
    • task

      public TimerTask task()
      Description copied from interface: Timeout
      Returns the TimerTask which is associated with this handle.
      Specified by:
      task in interface Timeout
    • cancel

      public boolean cancel()
      Description copied from interface: Timeout
      Attempts to cancel the TimerTask associated with this handle. If the task has been executed or cancelled already, it will return with no side effect.
      Specified by:
      cancel in interface Timeout
      Returns:
      True if the cancellation completed successfully, otherwise false
    • remove

      private void remove()
    • removeAfterCancellation

      void removeAfterCancellation()
    • compareAndSetState

      public boolean compareAndSetState(int expected, int state)
    • state

      public int state()
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Timeout
      Returns true if and only if the TimerTask associated with this handle has been cancelled.
      Specified by:
      isCancelled in interface Timeout
    • isExpired

      public boolean isExpired()
      Description copied from interface: Timeout
      Returns true if and only if the TimerTask associated with this handle has been expired.
      Specified by:
      isExpired in interface Timeout
    • expire

      public void expire()
    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object