public interface RScheduledExecutorService extends RExecutorService, ScheduledExecutorService, RScheduledExecutorServiceAsync
ScheduledExecutorService
MAPREDUCE_NAME
Modifier and Type | Method and Description |
---|---|
<V> RScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit)
Synchronously schedules a value-returning task for execution asynchronously
after the given
delay . |
<V> RScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit,
long timeToLive,
TimeUnit ttlUnit)
Synchronously schedules a value-returning task with defined
timeToLive parameter
for execution asynchronously after the given delay . |
RScheduledFuture<?> |
schedule(Runnable task,
CronSchedule cronSchedule)
Synchronously schedules a Runnable task for execution asynchronously
cron schedule object.
|
RScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit)
Synchronously schedules a Runnable task for execution asynchronously
after the given
delay . |
RScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit,
long timeToLive,
TimeUnit ttlUnit)
Synchronously schedules a Runnable task with defined
timeToLive parameter
for execution asynchronously after the given delay . |
RScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
Synchronously schedules a Runnable task for execution asynchronously
after the given
initialDelay , and subsequently with the given
period . |
RScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
Synchronously schedules a Runnable task for execution asynchronously
after the given
initialDelay , and subsequently with the given
delay started from the task finishing moment. |
cancelTask, countActiveWorkers, delete, execute, getName, getTaskCount, getTaskIds, hasTask, registerWorkers, registerWorkers, registerWorkers, submit, submit, submit, submit, submit, submit, submit
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
scheduleAsync, scheduleAsync, scheduleAsync, scheduleAsync, scheduleAsync, scheduleAtFixedRateAsync, scheduleWithFixedDelayAsync
cancelTaskAsync, deleteAsync, getTaskCountAsync, getTaskIdsAsync, hasTaskAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync, submitAsync
RScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
delay
. Returns a RScheduledFuture representing that task.
The Future's get
method will return the given result upon successful completion.schedule
in interface ScheduledExecutorService
command
- the task to executedelay
- the time from now to delay executionunit
- the time unit of the delay parameterget()
method will return
null
upon completionRScheduledFuture<?> schedule(Runnable command, 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.command
- 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 intervalget()
method will return
null
upon completion<V> RScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
delay
. Returns a RScheduledFuture representing that task.
The Future's get
method will return the given result upon successful completion.schedule
in interface ScheduledExecutorService
V
- the type of the callable's resultcallable
- the function to executedelay
- the time from now to delay executionunit
- the time unit of the delay parameter<V> RScheduledFuture<V> schedule(Callable<V> callable, 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 resultcallable
- 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<?> scheduleAtFixedRate(Runnable command, 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.scheduleAtFixedRate
in interface ScheduledExecutorService
command
- the task to executeinitialDelay
- the time to delay first executionperiod
- the period between successive executionsunit
- the time unit of the initialDelay and period parametersget()
method will throw an
exception upon cancellationRScheduledFuture<?> scheduleWithFixedDelay(Runnable command, 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.scheduleWithFixedDelay
in interface ScheduledExecutorService
command
- 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 parametersget()
method will throw an
exception upon cancellationRScheduledFuture<?> schedule(Runnable task, CronSchedule cronSchedule)
task
- - command the task to executecronSchedule-
- cron schedule objectCopyright © 2014–2020 Redisson. All rights reserved.