Interface ScheduledTask

All Superinterfaces:
Comparable<Delayed>, Delayed

public interface ScheduledTask extends Delayed
A delayed or repeating task scheduled with a EnhancedExecutor.
Author:
A248
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Cancels this scheduled task.
    boolean
    Whether this task is cancelled
    boolean
    Whether this task is cancelled, or is a delayed task and has been run
    boolean
    Whether this is a repeating task or a one time delayed task

    Methods inherited from interface Comparable

    compareTo

    Methods inherited from interface Delayed

    getDelay
  • Method Details

    • cancel

      boolean cancel()
      Cancels this scheduled task.

      If this is a delayed task, the work will not run unless it has already begun execution. Else, if it is a repeating task, further scheduling of the work will cease. If any execution is in process, it will complete first.
      Returns:
      true if cancelled, false if already cancelled, or this is a delayed task and already run
    • isCancelled

      boolean isCancelled()
      Whether this task is cancelled
      Returns:
      true if cancelled, false otherwise
    • isDone

      boolean isDone()
      Whether this task is cancelled, or is a delayed task and has been run
      Returns:
      true if cancelled or this is a delayed task which has been run
    • isRepeating

      boolean isRepeating()
      Whether this is a repeating task or a one time delayed task
      Returns:
      true if repeating, false if a one off delayed task