- Enclosing class:
TaskScheduler
public static sealed interface TaskScheduler.Builder
A builder for
TaskScheduler-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides aTaskScheduler.Builderstatic interfaceProvides aTaskScheduler.Builder.IntervalStep -
Method Summary
Modifier and TypeMethodDescriptionbuild()initialDelay(int initialDelay) Note that this is overridden bythreadFactory(ThreadFactory)start()Builds and starts a newTaskScheduler.threadFactory(ThreadFactory threadFactory) Note that this overridesname(String)
-
Method Details
-
initialDelay
- Parameters:
initialDelay- the initial start delay, used on restarts as well- Returns:
- this builder instance
-
threadFactory
Note that this overridesname(String)- Parameters:
threadFactory- the thread factory to use- Returns:
- this builder instance
-
name
Note that this is overridden bythreadFactory(ThreadFactory)- Parameters:
name- the name to use for the scheduler thread- Returns:
- this builder instance
-
start
TaskScheduler start()Builds and starts a newTaskScheduler.- Returns:
- a new
TaskScheduler.
-
build
TaskScheduler build()- Returns:
- a new
TaskScheduler.
-