Interface RExecutorServiceAsync

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      >  taskId)
      Cancel task by id
      > deleteAsync()
      Deletes executor request queue and state objects
      > getTaskCountAsync()
      Returns amount of tasks awaiting for execution and/or currently in execution.
      <>> getTaskIdsAsync()
      Returns list of task ids awaiting for execution and/or currently in execution.
      >  taskId)
      Returns true if this Executor Service has task by taskId awaiting for execution and/or currently in execution
      RExecutorFuture<?>  task)
      Submits task for execution asynchronously
      RExecutorBatchFuture ... tasks)
      Submits tasks batch for execution asynchronously.
      RExecutorFuture<?>  task, long timeToLive,  timeUnit)
      Submits a task with defined timeToLive parameter for execution asynchronously.
      RExecutorBatchFuture <?>... tasks)
      Submits tasks batch for execution asynchronously.
      <T> RExecutorFuture<T> <T> task)
      Submits task for execution asynchronously
      <T> RExecutorFuture<T> <T> task, long timeToLive,  timeUnit)
      Submits a value-returning task with defined timeToLive parameter for execution asynchronously.
    • Method Detail

      • hasTaskAsync

        > hasTaskAsync​( taskId)
        Returns true if this Executor Service has task by taskId awaiting for execution and/or currently in execution
        Parameters:
        taskId - - id of task
        Returns:
        true if this Executor Service has task
      • getTaskCountAsync

        > getTaskCountAsync()
        Returns amount of tasks awaiting for execution and/or currently in execution.
        Returns:
        amount of tasks
      • getTaskIdsAsync

        <>> getTaskIdsAsync()
        Returns list of task ids awaiting for execution and/or currently in execution.
        Returns:
        task ids
      • cancelTaskAsync

        > cancelTaskAsync​( taskId)
        Cancel task by id
        Parameters:
        taskId - - id of task
        Returns:
        true if task has been canceled successfully
        See Also:
        RExecutorFuture.getTaskId()
      • deleteAsync

        > deleteAsync()
        Deletes executor request queue and state objects
        Returns:
        true if any of objects were deleted
      • submitAsync

        <T> <T> task)
        Submits task for execution asynchronously
        Type Parameters:
        T - type of return value
        Parameters:
        task - - task to execute
        Returns:
        Future object
      • submitAsync

        <T> <T> task,
                                           long timeToLive,
                                            timeUnit)
        Submits a value-returning task with defined timeToLive parameter for execution asynchronously. 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 - the type of the task's result
        Parameters:
        task - the task to submit
        timeToLive - - time to live interval
        timeUnit - - unit of time to live interval
        Returns:
        a Future representing pending completion of the task
      • submitAsync

        <?>... tasks)
        Submits tasks batch for execution asynchronously. All tasks are stored to executor request queue atomically, if case of any error none of tasks will be added.
        Parameters:
        tasks - - tasks to execute
        Returns:
        Future object
      • submitAsync

         task)
        Submits task for execution asynchronously
        Parameters:
        task - - task to execute
        Returns:
        Future object
      • submitAsync

         task,
                                       long timeToLive,
                                        timeUnit)
        Submits a task with defined timeToLive parameter for execution asynchronously. Returns a Future representing task completion. The Future's get method will return the task's result upon successful completion.
        Parameters:
        task - the task to submit
        timeToLive - - time to live interval
        timeUnit - - unit of time to live interval
        Returns:
        a Future representing pending completion of the task
      • submitAsync

        ... tasks)
        Submits tasks batch for execution asynchronously. All tasks are stored to executor request queue atomically, if case of any error none of tasks will be added.
        Parameters:
        tasks - - tasks to execute
        Returns:
        Future object