Interface Scheduler
- All Superinterfaces:
AutoCloseable, Closeable
Represents a scheduler that can be used to schedule tasks to be executed at a later time.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Task.BuilderCreates a new task builder.static @NotNull SchedulerInternal factory method for creating a new scheduler instance.@NotNull TasksubmitTask(Task.Builder builder) Submits a task to be executed at a later time or repeatedly.
-
Method Details
-
newScheduler
Internal factory method for creating a new scheduler instance.
This method should only be used internally and should not be accessed directly by external users of the API.
- Returns:
- A new instance of
SchedulerImpl.
-
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
-