Interface RScheduledExecutorServiceAsync

    • Method Detail

      • scheduleAsync

        RScheduledFuture<?> scheduleAsync​(Runnable task,
                                          long delay,
                                          TimeUnit unit)
        Creates in async mode and executes a one-shot action that becomes enabled after the given delay.
        Parameters:
        task - the task to execute
        delay - the time from now to delay execution
        unit - the time unit of the delay parameter
        Returns:
        RScheduledFuture with listeners support
      • scheduleAsync

        <V> RScheduledFuture<V> scheduleAsync​(Callable<V> task,
                                              long delay,
                                              TimeUnit unit)
        Creates in async mode and executes a ScheduledFuture that becomes enabled after the given delay.
        Type Parameters:
        V - the type of the callable's result
        Parameters:
        task - the function to execute
        delay - the time from now to delay execution
        unit - the time unit of the delay parameter
        Returns:
        RScheduledFuture with listeners support
      • scheduleAtFixedRateAsync

        RScheduledFuture<?> scheduleAtFixedRateAsync​(Runnable task,
                                                     long initialDelay,
                                                     long period,
                                                     TimeUnit unit)
        Creates in async mode and executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given period. 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.
        Parameters:
        task - the task to execute
        initialDelay - the time to delay first execution
        period - the period between successive executions
        unit - the time unit of the initialDelay and period parameters
        Returns:
        RScheduledFuture with listeners support
      • scheduleWithFixedDelayAsync

        RScheduledFuture<?> scheduleWithFixedDelayAsync​(Runnable task,
                                                        long initialDelay,
                                                        long delay,
                                                        TimeUnit unit)
        Creates in async mode 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. 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.
        Parameters:
        task - the task to execute
        initialDelay - the time to delay first execution
        delay - the delay between the termination of one execution and the commencement of the next
        unit - the time unit of the initialDelay and delay parameters
        Returns:
        RScheduledFuture with listeners support
      • scheduleAsync

        RScheduledFuture<?> scheduleAsync​(Runnable task,
                                          CronSchedule cronSchedule)
        Creates in async mode and executes a periodic action with cron schedule object. 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.
        Parameters:
        task - the task to execute
        cronSchedule - cron schedule object
        Returns:
        RScheduledFuture with listeners support