public interface Task
Scheduled task.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Close the created task.Human-readable description of the task invocation interval.default booleanenabled()If task is enabled or disabled, scheduling tasks are enabled by default and can be disabled programmatically or via configuration.executor()Executorused for invocation of scheduled tasks.default Stringid()ID used to identify this task.
-
Method Details
-
description
String description()Human-readable description of the task invocation interval.- Returns:
- interval description
-
executor
ScheduledExecutorService executor()Executorused 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
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
-