Package dev.failsafe.internal.util
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 ScheduledThreadPoolExecutor
private final ExecutorService
private static ForkJoinPool
static final DelegatingScheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ScheduledExecutorService
delayer()
private ExecutorService
Schedules thecallable
to be called after thedelay
for theunit
.
-
Field Details
-
INSTANCE
-
FORK_JOIN_POOL
-
DELAYER
-
executorService
-
-
Constructor Details
-
DelegatingScheduler
private DelegatingScheduler() -
DelegatingScheduler
-
-
Method Details