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.
    default boolean
    If task is enabled or disabled, scheduling tasks are enabled by default and can be disabled programmatically or via configuration.
    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.
    • enabled

      default boolean enabled()
      If task is enabled or disabled, scheduling tasks are enabled by default and can be disabled programmatically or via configuration.
      Returns:
      true if enabled
    • 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