|
|
@ -27,8 +27,9 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync {
|
|
|
|
public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates in async mode and executes a one-shot action that becomes enabled
|
|
|
|
* Schedules a Runnable task for execution asynchronously
|
|
|
|
* after the given delay.
|
|
|
|
* after the given <code>delay</code>. Returns a RScheduledFuture representing that task.
|
|
|
|
|
|
|
|
* The Future's {@code get} method will return the given result upon successful completion.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param delay the time from now to delay execution
|
|
|
|
* @param delay the time from now to delay execution
|
|
|
@ -38,8 +39,24 @@ public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync {
|
|
|
|
RScheduledFuture<?> scheduleAsync(Runnable task, long delay, TimeUnit unit);
|
|
|
|
RScheduledFuture<?> scheduleAsync(Runnable task, long delay, TimeUnit unit);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates in async mode and executes a ScheduledFuture that becomes enabled after the
|
|
|
|
* Schedules a Runnable task with defined <code>timeToLive</code> parameter
|
|
|
|
* given delay.
|
|
|
|
* for execution asynchronously after the given <code>delay</code>.
|
|
|
|
|
|
|
|
* Returns a RScheduledFuture representing that task.
|
|
|
|
|
|
|
|
* The Future's {@code get} method will return the given result upon successful completion.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param task the task to execute
|
|
|
|
|
|
|
|
* @param delay the time from now to delay execution
|
|
|
|
|
|
|
|
* @param unit the time unit of the delay parameter
|
|
|
|
|
|
|
|
* @param timeToLive - time to live interval
|
|
|
|
|
|
|
|
* @param ttlUnit - unit of time to live interval
|
|
|
|
|
|
|
|
* @return RScheduledFuture with listeners support
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
RScheduledFuture<?> scheduleAsync(Runnable task, long delay, TimeUnit unit, long timeToLive, TimeUnit ttlUnit);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Schedules a value-returning task for execution asynchronously
|
|
|
|
|
|
|
|
* after the given <code>delay</code>. Returns a RScheduledFuture representing that task.
|
|
|
|
|
|
|
|
* The Future's {@code get} method will return the given result upon successful completion.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param task the function to execute
|
|
|
|
* @param task the function to execute
|
|
|
|
* @param delay the time from now to delay execution
|
|
|
|
* @param delay the time from now to delay execution
|
|
|
@ -50,15 +67,28 @@ public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync {
|
|
|
|
<V> RScheduledFuture<V> scheduleAsync(Callable<V> task, long delay, TimeUnit unit);
|
|
|
|
<V> RScheduledFuture<V> scheduleAsync(Callable<V> task, long delay, TimeUnit unit);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates in async mode and executes a periodic action that becomes enabled first
|
|
|
|
* Schedules a value-returning task with defined <code>timeToLive</code> parameter
|
|
|
|
* after the given initial delay, and subsequently with the given
|
|
|
|
* for execution asynchronously after the given <code>delay</code>.
|
|
|
|
* period.
|
|
|
|
* Returns a RScheduledFuture representing that task.
|
|
|
|
* If any execution of the task
|
|
|
|
* The Future's {@code get} method will return the given result upon successful completion.
|
|
|
|
* encounters an exception, subsequent executions are suppressed.
|
|
|
|
*
|
|
|
|
* Otherwise, the task will only terminate via cancellation or
|
|
|
|
* @param task the function to execute
|
|
|
|
* termination of the executor. If any execution of this task
|
|
|
|
* @param delay the time from now to delay execution
|
|
|
|
* takes longer than its period, then subsequent executions
|
|
|
|
* @param unit the time unit of the delay parameter
|
|
|
|
* may start late, but will not concurrently execute.
|
|
|
|
* @param timeToLive - time to live interval
|
|
|
|
|
|
|
|
* @param ttlUnit - unit of time to live interval
|
|
|
|
|
|
|
|
* @param <V> the type of the callable's result
|
|
|
|
|
|
|
|
* @return RScheduledFuture with listeners support
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
<V> RScheduledFuture<V> scheduleAsync(Callable<V> task, long delay, TimeUnit unit, long timeToLive, TimeUnit ttlUnit);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Schedules a Runnable task for execution asynchronously
|
|
|
|
|
|
|
|
* after the given <code>initialDelay</code>, and subsequently with the given
|
|
|
|
|
|
|
|
* <code>period</code>.
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param initialDelay the time to delay first execution
|
|
|
|
* @param initialDelay the time to delay first execution
|
|
|
@ -69,12 +99,11 @@ public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync {
|
|
|
|
RScheduledFuture<?> scheduleAtFixedRateAsync(Runnable task, long initialDelay, long period, TimeUnit unit);
|
|
|
|
RScheduledFuture<?> scheduleAtFixedRateAsync(Runnable task, long initialDelay, long period, TimeUnit unit);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates in async mode and executes a periodic action that becomes enabled first
|
|
|
|
* Schedules a Runnable task for execution asynchronously
|
|
|
|
* after the given initial delay, and subsequently with the
|
|
|
|
* after the given <code>initialDelay</code>, and subsequently with the given
|
|
|
|
* given delay between the termination of one execution and the
|
|
|
|
* <code>delay</code> started from the task finishing moment.
|
|
|
|
* commencement of the next. If any execution of the task
|
|
|
|
* Subsequent executions are stopped if any execution of the task throws an exception.
|
|
|
|
* encounters an exception, subsequent executions are suppressed.
|
|
|
|
* Otherwise, task could be terminated via cancellation or
|
|
|
|
* Otherwise, the task will only terminate via cancellation or
|
|
|
|
|
|
|
|
* termination of the executor.
|
|
|
|
* termination of the executor.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param task the task to execute
|
|
|
@ -87,13 +116,11 @@ public interface RScheduledExecutorServiceAsync extends RExecutorServiceAsync {
|
|
|
|
RScheduledFuture<?> scheduleWithFixedDelayAsync(Runnable task, long initialDelay, long delay, TimeUnit unit);
|
|
|
|
RScheduledFuture<?> scheduleWithFixedDelayAsync(Runnable task, long initialDelay, long delay, TimeUnit unit);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates in async mode and executes a periodic action with cron schedule object.
|
|
|
|
* Synchronously schedules a Runnable task for execution asynchronously
|
|
|
|
* If any execution of the task
|
|
|
|
* cron schedule object.
|
|
|
|
* encounters an exception, subsequent executions are suppressed.
|
|
|
|
* Subsequent executions are stopped if any execution of the task throws an exception.
|
|
|
|
* Otherwise, the task will only terminate via cancellation or
|
|
|
|
* Otherwise, task could be terminated via cancellation or
|
|
|
|
* termination of the executor. If any execution of this task
|
|
|
|
* termination of the executor.
|
|
|
|
* takes longer than its period, then subsequent executions
|
|
|
|
|
|
|
|
* may start late, but will not concurrently execute.
|
|
|
|
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param task the task to execute
|
|
|
|
* @param cronSchedule cron schedule object
|
|
|
|
* @param cronSchedule cron schedule object
|
|
|
|