Interface ComputeTaskFuture<R>

  • Type Parameters:
    R - Type of the task result returning from ComputeTask.reduce(List) method.
    All Superinterfaces:
    IgniteFuture<R>

    public interface ComputeTaskFuture<R>
    extends IgniteFuture<R>
    This class defines a handler for asynchronous task execution. It's similar in design to standard JDK Future interface but has improved and easier to use exception hierarchy.
    • Method Detail

      • get

        R get()
        Synchronously waits for completion of the computation and returns computation result.
        Specified by:
        get in interface IgniteFuture<R>
        Returns:
        Computation result.
        Throws:
        ComputeTaskTimeoutException - If task execution timed out.
      • get

        R get​(long timeout,
              TimeUnit unit)
        Synchronously waits for completion of the computation for up to the timeout specified and returns computation result.
        Specified by:
        get in interface IgniteFuture<R>
        Parameters:
        timeout - The maximum time to wait.
        unit - The time unit of the timeout argument.
        Returns:
        Computation result.
        Throws:
        ComputeTaskTimeoutException - If task execution timed out.
      • getTaskSession

        ComputeTaskSession getTaskSession()
        Gets task session of execution grid task.
        Returns:
        Task session.