Interface ClientExecutor

  • All Known Implementing Classes:
    ClientRuntime

    public interface ClientExecutor
    Executor for client async processing and background task scheduling.
    Since:
    2.26
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.ScheduledFuture<?> schedule​(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
      Creates and executes a one-shot action that becomes enabled after the given delay.
      <T> java.util.concurrent.ScheduledFuture<T> schedule​(java.util.concurrent.Callable<T> callable, long delay, java.util.concurrent.TimeUnit unit)
      Creates and executes a ScheduledFuture that becomes enabled after the given delay.
      java.util.concurrent.Future<?> submit​(java.lang.Runnable task)
      Submits a Runnable task for execution and returns a Future representing that task.
      <T> java.util.concurrent.Future<T> submit​(java.lang.Runnable task, T result)
      Submits a Runnable task for execution and returns a Future representing that task.
      <T> java.util.concurrent.Future<T> submit​(java.util.concurrent.Callable<T> task)
      Submits a value-returning task for execution and returns a Future representing the pending results of the task.
    • Method Detail

      • submit

        <T> java.util.concurrent.Future<T> submit​(java.util.concurrent.Callable<T> task)
        Submits a value-returning task for execution and returns a Future representing the pending results of the task. The Future's get() method will return the task's result upon successful completion.
        Type Parameters:
        T - task's return type
        Parameters:
        task - task to submit
        Returns:
        a Future representing pending completion of the task
      • submit

        java.util.concurrent.Future<?> submit​(java.lang.Runnable task)
        Submits a Runnable task for execution and returns a Future representing that task. The Future's get() method will return the given result upon successful completion.
        Parameters:
        task - the task to submit
        Returns:
        a Future representing pending completion of the task
      • submit

        <T> java.util.concurrent.Future<T> submit​(java.lang.Runnable task,
                                                  T result)
        Submits a Runnable task for execution and returns a Future representing that task. The Future's get() method will return the given result upon successful completion.
        Type Parameters:
        T - result type
        Parameters:
        task - the task to submit
        result - the result to return
        Returns:
        a Future representing pending completion of the task
      • schedule

        <T> java.util.concurrent.ScheduledFuture<T> schedule​(java.util.concurrent.Callable<T> callable,
                                                             long delay,
                                                             java.util.concurrent.TimeUnit unit)
        Creates and executes a ScheduledFuture that becomes enabled after the given delay.
        Type Parameters:
        T - return type of the function
        Parameters:
        callable - the function to execute
        delay - the time from now to delay execution
        unit - the time unit of the delay parameter
        Returns:
        a ScheduledFuture that can be used to extract result or cancel
      • schedule

        java.util.concurrent.ScheduledFuture<?> schedule​(java.lang.Runnable command,
                                                         long delay,
                                                         java.util.concurrent.TimeUnit unit)
        Creates and executes a one-shot action that becomes enabled after the given delay.
        Parameters:
        command - the task to execute
        delay - the time from now to delay execution
        unit - the time unit of the daly parameter
        Returns:
        a scheduledFuture representing pending completion of the task and whose get() method will return null upon completion