Interface Timeout

All Known Implementing Classes:
HashedWheelTimer.HashedWheelTimeout

public interface Timeout
A handle associated with a TimerTask that is returned by a Timer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels the TimerTask associated with this handle.
    Returns the TimerTask which is associated with this handle.
    Returns the Timer that created this handle.
    boolean
    Returns true if and only if the TimerTask associated with this handle has been cancelled.
    boolean
    Returns true if and only if the TimerTask associated with this handle has been expired.
  • Method Details

    • getTimer

      Timer getTimer()
      Returns the Timer that created this handle.
    • getTask

      TimerTask getTask()
      Returns the TimerTask which is associated with this handle.
    • isExpired

      boolean isExpired()
      Returns true if and only if the TimerTask associated with this handle has been expired.
    • isCancelled

      boolean isCancelled()
      Returns true if and only if the TimerTask associated with this handle has been cancelled.
    • cancel

      void cancel()
      Cancels the TimerTask associated with this handle. It the task has been executed or cancelled already, it will return with no side effect.