Class CommandScheduler
- java.lang.Object
-
- io.helidon.microprofile.faulttolerance.CommandScheduler
-
- All Implemented Interfaces:
net.jodah.failsafe.util.concurrent.Scheduler
public class CommandScheduler extends Object implements net.jodah.failsafe.util.concurrent.Scheduler
Class CommandScheduler.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CommandScheduler
create(int threadPoolSize)
If no command scheduler exists, creates one using default values.ScheduledFuture<?>
schedule(Callable<?> callable, long delay, TimeUnit unit)
Schedules a task using an executor.
-
-
-
Method Detail
-
create
public static CommandScheduler create(int threadPoolSize)
If no command scheduler exists, creates one using default values. Disables daemon threads.- Parameters:
threadPoolSize
- Size of thread pool for async commands.- Returns:
- Existing scheduler or newly created one.
-
schedule
public ScheduledFuture<?> schedule(Callable<?> callable, long delay, TimeUnit unit)
Schedules a task using an executor.- Specified by:
schedule
in interfacenet.jodah.failsafe.util.concurrent.Scheduler
- Parameters:
callable
- The callable.delay
- Delay before scheduling task.unit
- Unite of delay.- Returns:
- Future to track task execution.
-
-