public interface RScheduledExecutorService extends RExecutorService, ScheduledExecutorService, RScheduledExecutorServiceAsync
ScheduledExecutorService
MAPREDUCE_NAME
Modifier and Type | Method and Description |
---|---|
boolean |
cancelScheduledTask(String taskId)
Deprecated.
|
<V> RScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit)
Creates and executes a ScheduledFuture that becomes enabled after the
given delay.
|
RScheduledFuture<?> |
schedule(Runnable task,
CronSchedule cronSchedule)
Creates and executes a periodic action with cron schedule object.
|
RScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit)
Creates and executes a one-shot action that becomes enabled
after the given delay.
|
RScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
Creates and executes a periodic action that becomes enabled first
after the given initial delay, and subsequently with the given
period; that is executions will commence after
initialDelay then initialDelay+period , then
initialDelay + 2 * period , and so on. |
RScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
Creates and executes a periodic action that becomes enabled first
after the given initial delay, and subsequently with the
given delay between the termination of one execution and the
commencement of the next.
|
cancelTask, countActiveWorkers, delete, execute, getName, registerWorkers, registerWorkers, submit, submit, submit, submit, submit
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
scheduleAsync, scheduleAsync, scheduleAsync, scheduleAtFixedRateAsync, scheduleWithFixedDelayAsync
deleteAsync, submitAsync, submitAsync, submitAsync, submitAsync
RScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
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 completion<V> RScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
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 parameterRScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
initialDelay
then initialDelay+period
, then
initialDelay + 2 * period
, and so on.
If any execution of the task
encounters an exception, subsequent executions are suppressed.
Otherwise, the task will only terminate via cancellation or
termination of the executor. If any execution of this task
takes longer than its period, then subsequent executions
may start late, but will not concurrently execute.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)
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 object@Deprecated boolean cancelScheduledTask(String taskId)
taskId
- of taskCopyright © 2014–2019 The Redisson Project. All rights reserved.