public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync
ScheduledExecutorService
Modifier and Type | Method and Description |
---|---|
<V> RScheduledFuture<V> |
scheduleAsync(Callable<V> task,
long delay,
TimeUnit unit)
Schedules a value-returning task for execution asynchronously
after the given
delay . |
<V> RScheduledFuture<V> |
scheduleAsync(Callable<V> task,
long delay,
TimeUnit unit,
long timeToLive,
TimeUnit ttlUnit)
Schedules a value-returning task with defined
timeToLive parameter
for execution asynchronously after the given delay . |
RScheduledFuture<?> |
scheduleAsync(Runnable task,
CronSchedule cronSchedule)
Synchronously schedules a Runnable task for execution asynchronously
cron schedule object.
|
RScheduledFuture<?> |
scheduleAsync(Runnable task,
long delay,
TimeUnit unit)
Schedules a Runnable task for execution asynchronously
after the given
delay . |
RScheduledFuture<?> |
scheduleAsync(Runnable task,
long delay,
TimeUnit unit,
long timeToLive,
TimeUnit ttlUnit)
Schedules a Runnable task with defined
timeToLive parameter
for execution asynchronously after the given delay . |
RScheduledFuture<?> |
scheduleAtFixedRateAsync(Runnable task,
long initialDelay,
long period,
TimeUnit unit)
Schedules a Runnable task for execution asynchronously
after the given
initialDelay , and subsequently with the given
period . |
RScheduledFuture<?> |
scheduleWithFixedDelayAsync(Runnable task,
long initialDelay,
long delay,
TimeUnit unit)
Schedules a Runnable task for execution asynchronously
after the given
initialDelay , and subsequently with the given
delay started from the task finishing moment. |
cancelTaskAsync, deleteAsync, getTaskCountAsync, getTaskIdsAsync, hasTaskAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync
RScheduledFuture<?> scheduleAsync(Runnable task, long delay, TimeUnit unit)
delay
. Returns a RScheduledFuture representing that task.
The Future's get
method will return the given result upon successful completion.task
- the task to executedelay
- the time from now to delay executionunit
- the time unit of the delay parameterRScheduledFuture<?> scheduleAsync(Runnable task, long delay, TimeUnit unit, long timeToLive, TimeUnit ttlUnit)
timeToLive
parameter
for execution asynchronously after the given delay
.
Returns a RScheduledFuture representing that task.
The Future's get
method will return the given result upon successful completion.task
- the task to executedelay
- the time from now to delay executionunit
- the time unit of the delay parametertimeToLive
- - time to live intervalttlUnit
- - unit of time to live interval<V> RScheduledFuture<V> scheduleAsync(Callable<V> task, long delay, TimeUnit unit)
delay
. Returns a RScheduledFuture representing that task.
The Future's get
method will return the given result upon successful completion.V
- the type of the callable's resulttask
- the function to executedelay
- the time from now to delay executionunit
- the time unit of the delay parameter<V> RScheduledFuture<V> scheduleAsync(Callable<V> task, long delay, TimeUnit unit, long timeToLive, TimeUnit ttlUnit)
timeToLive
parameter
for execution asynchronously after the given delay
.
Returns a RScheduledFuture representing that task.
The Future's get
method will return the given result upon successful completion.V
- the type of the callable's resulttask
- the function to executedelay
- the time from now to delay executionunit
- the time unit of the delay parametertimeToLive
- - time to live intervalttlUnit
- - unit of time to live intervalRScheduledFuture<?> scheduleAtFixedRateAsync(Runnable task, long initialDelay, long period, TimeUnit unit)
initialDelay
, and subsequently with the given
period
.
Subsequent executions are stopped if any execution of the task throws an exception.
Otherwise, task could be terminated via cancellation or
termination of the executor.task
- the task to executeinitialDelay
- the time to delay first executionperiod
- the period between successive executionsunit
- the time unit of the initialDelay and period parametersRScheduledFuture<?> scheduleWithFixedDelayAsync(Runnable task, long initialDelay, long delay, TimeUnit unit)
initialDelay
, and subsequently with the given
delay
started from the task finishing moment.
Subsequent executions are stopped if any execution of the task throws an exception.
Otherwise, task could be terminated via cancellation or
termination of the executor.task
- the task to executeinitialDelay
- the time to delay first executiondelay
- the delay between the termination of one
execution and the commencement of the nextunit
- the time unit of the initialDelay and delay parametersRScheduledFuture<?> scheduleAsync(Runnable task, CronSchedule cronSchedule)
task
- the task to executecronSchedule
- cron schedule objectCopyright © 2014–2021 Redisson. All rights reserved.