Interface Task

All Known Subinterfaces:
Cron, FixedRate

public interface Task
Scheduled task.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Close the created task.
    Human-readable description of the task invocation interval.
    Executor used for invocation of scheduled tasks.
    default String
    id()
    ID used to identify this task.
  • Method Details

    • description

      String description()
      Human-readable description of the task invocation interval.
      Returns:
      interval description
    • executor

      Executor used for invocation of scheduled tasks.
      Returns:
      used executor
    • close

      default void close()
      Close the created task. This will cancel the scheduled future.
    • id

      default String id()
      ID used to identify this task. It should be unique, as it is used to identify a single task, for example to cancel it.
      Returns:
      task ID