Class DelegatingScheduler
java.lang.Object
dev.failsafe.internal.util.DelegatingScheduler
- All Implemented Interfaces:
Scheduler
A
Scheduler implementation that schedules delays on an internal, common ScheduledExecutorService and executes
tasks on either a provided ExecutorService, ForkJoinPool.commonPool(), or an internal
ForkJoinPool instance. If no ExecutorService is supplied, the ForkJoinPool.commonPool() will
be used, unless the common pool's parallelism is 1, then an internal ForkJoinPool with parallelism of 2 will
be created and used.
Supports cancellation and interruption of ForkJoinPool tasks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ScheduledThreadPoolExecutorprivate final ExecutorServiceprivate static ForkJoinPoolstatic final DelegatingScheduler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ScheduledExecutorServicedelayer()private ExecutorServiceSchedules thecallableto be called after thedelayfor theunit.
-
Field Details
-
INSTANCE
-
FORK_JOIN_POOL
-
DELAYER
-
executorService
-
-
Constructor Details
-
DelegatingScheduler
private DelegatingScheduler() -
DelegatingScheduler
-
-
Method Details
-
delayer
-
executorService
-
schedule
-