接口 Timeout


public interface Timeout
A handle associated with a TimerTask that is returned by aTimer.

Copy from dubbo, see here for more details.

  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    Attempts to cancel the TimerTask associated with 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.
    Returns the TimerTask which is associated with this handle.
    Returns the Timer that created this handle.
  • 方法详细资料

    • timer

      Timer timer()
      Returns the Timer that created this handle.
      返回:
      the Timer that created this handle
    • task

      TimerTask task()
      Returns the TimerTask which is associated with this handle.
      返回:
      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.
      返回:
      true if and only if the TimerTask associated
    • isCancelled

      boolean isCancelled()
      Returns true if and only if the TimerTask associated with this handle has been cancelled.
      返回:
      true if and only if the TimerTask associated
    • 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.
      返回:
      True if the cancellation completed successfully, otherwise false