Module io.netty5.common
Package io.netty5.util

Interface Timeout


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

      All Methods
      Modifier and Type Method Description
      boolean cancel ()
      Attempts to cancel the TimerTask associated with this handle.
      boolean isCancelled ()
      Returns true if and only if the TimerTask associated with this handle has been cancelled.
      boolean isExpired ()
      Returns true if and only if the TimerTask associated with this handle has been expired.
      TimerTask task ()
      Returns the TimerTask which is associated with this handle.
      Timer timer ()
      Returns the Timer that created this handle.
    • Method Detail

      • timer

        Timer timer()
        Returns the Timer that created 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

        boolean cancel()
        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.
        Returns:
        True if the cancellation completed successfully, otherwise false