Package dev.failsafe.spi
Interface Scheduler
-
- All Known Implementing Classes:
DelegatingScheduler
public interface Scheduler
Schedules executions.- See Also:
DefaultScheduledFuture
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Scheduler
of(java.util.concurrent.ExecutorService executorService)
Returns a Scheduler adapted from theexecutorService
.static Scheduler
of(java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
Returns a Scheduler adapted from thescheduledExecutorService
.java.util.concurrent.ScheduledFuture<?>
schedule(java.util.concurrent.Callable<?> callable, long delay, java.util.concurrent.TimeUnit unit)
Schedules thecallable
to be called after thedelay
for theunit
.
-
-
-
Field Detail
-
DEFAULT
static final Scheduler DEFAULT
The default scheduler used by Failsafe if no other scheduler orScheduledExecutorService
is configured for an execution.
-
-
Method Detail
-
schedule
java.util.concurrent.ScheduledFuture<?> schedule(java.util.concurrent.Callable<?> callable, long delay, java.util.concurrent.TimeUnit unit)
Schedules thecallable
to be called after thedelay
for theunit
.
-
of
static Scheduler of(java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
Returns a Scheduler adapted from thescheduledExecutorService
.
-
of
static Scheduler of(java.util.concurrent.ExecutorService executorService)
Returns a Scheduler adapted from theexecutorService
.
-
-