Interface Scheduler
- All Superinterfaces:
AutoCloseable,Closeable
Represents a scheduler that can be used to schedule tasks to be executed at a later time.
This interface provides methods to schedule tasks to be executed at a later time.
This interface is by default implemented by the SchedulerImpl class.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Task.BuilderCreates a new task builder.static @NotNull SchedulerCreates a new scheduler.@NotNull TasksubmitTask(Task.Builder builder) Submits a task to be executed at a later time or repeatedly.
-
Method Details
-
newScheduler
Creates a new scheduler.- Returns:
- a new scheduler
-
buildTask
Creates a new task builder.- Parameters:
task- the task to be executed- Returns:
- a new task builder
-
submitTask
Submits a task to be executed at a later time or repeatedly.- Parameters:
builder- the task builder- Returns:
- the submitted task
-