Interface IgniteCompute


public interface IgniteCompute
Provides the ability to execute Compute jobs.
See Also:
  • Method Details

    • submitAsync

      default <T, R> CompletableFuture<JobExecution<R>> submitAsync(JobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg)
      Submits a ComputeJob of the given class for an execution on a single node from a set of candidate nodes.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      Returns:
      Future of the job execution object which will be completed when the job is submitted.
    • submitAsync

      <T, R> CompletableFuture<JobExecution<R>> submitAsync(JobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Submits a ComputeJob of the given class for an execution on a single node from a set of candidate nodes.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      cancellationToken - Cancellation token or null.
      Returns:
      Future of the job execution object which will be completed when the job is submitted.
    • submitAsync

      default <T, R> CompletableFuture<BroadcastExecution<R>> submitAsync(BroadcastJobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg)
      Submits a ComputeJob of the given class for an execution on all nodes in the given node set.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Broadcast execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      Returns:
      Future of the broadcast job execution object which will be completed when all the jobs are submitted.
    • submitAsync

      <T, R> CompletableFuture<BroadcastExecution<R>> submitAsync(BroadcastJobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Submits a ComputeJob of the given class for an execution on all nodes in the given node set.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Broadcast execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      cancellationToken - Cancellation token or null.
      Returns:
      Future of the broadcast job execution object which will be completed when all the jobs are submitted.
    • executeAsync

      default <T, R> CompletableFuture<R> executeAsync(JobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg)
      Submits a ComputeJob of the given class for an execution on a single node from a set of candidate nodes. A shortcut for submit(...).resultAsync().
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      Returns:
      Job result future.
    • executeAsync

      default <T, R> CompletableFuture<R> executeAsync(JobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Submits a ComputeJob of the given class for an execution on a single node from a set of candidate nodes. A shortcut for submit(...).resultAsync().
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      cancellationToken - Cancellation token or null.
      Returns:
      Job result future.
    • executeAsync

      default <T, R> CompletableFuture<Collection<R>> executeAsync(BroadcastJobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg)
      Executes a ComputeJob of the given class on all nodes in the given node set.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Broadcast execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      Returns:
      Job results future.
    • executeAsync

      default <T, R> CompletableFuture<Collection<R>> executeAsync(BroadcastJobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Executes a ComputeJob of the given class on all nodes in the given node set.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Broadcast execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      cancellationToken - Cancellation token or null.
      Returns:
      Job results future.
    • execute

      default <T, R> R execute(JobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg)
      Executes a ComputeJob of the given class on a single node from a set of candidate nodes.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      Returns:
      Job result.
      Throws:
      ComputeException - If there is any problem executing the job.
    • execute

      <T, R> R execute(JobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Executes a ComputeJob of the given class on a single node from a set of candidate nodes.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      cancellationToken - Cancellation token or null.
      Returns:
      Job result.
      Throws:
      ComputeException - If there is any problem executing the job.
    • execute

      default <T, R> Collection<R> execute(BroadcastJobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg)
      Executes a ComputeJob of the given class on all nodes in the given node set.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Broadcast execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      Returns:
      Collection of results.
      Throws:
      ComputeException - If there is any problem executing the job.
    • execute

      <T, R> Collection<R> execute(BroadcastJobTarget target, JobDescriptor<T,R> descriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Executes a ComputeJob of the given class on all nodes in the given node set.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      target - Broadcast execution target.
      descriptor - Job descriptor.
      arg - Argument of the job.
      cancellationToken - Cancellation token or null.
      Returns:
      Collection of results.
      Throws:
      ComputeException - If there is any problem executing the job.
    • submitMapReduce

      default <T, R> TaskExecution<R> submitMapReduce(TaskDescriptor<T,R> taskDescriptor, @Nullable T arg)
      Submits a MapReduceTask of the given class for an execution.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      taskDescriptor - Map reduce task descriptor.
      arg - Task argument.
      Returns:
      Task execution interface.
    • submitMapReduce

      <T, R> TaskExecution<R> submitMapReduce(TaskDescriptor<T,R> taskDescriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Submits a MapReduceTask of the given class for an execution.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      taskDescriptor - Map reduce task descriptor.
      arg - Task argument.
      cancellationToken - Cancellation token or null.
      Returns:
      Task execution interface.
    • executeMapReduceAsync

      default <T, R> CompletableFuture<R> executeMapReduceAsync(TaskDescriptor<T,R> taskDescriptor, @Nullable T arg)
      Submits a MapReduceTask of the given class for an execution. A shortcut for submitMapReduce(...).resultAsync().
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      taskDescriptor - Map reduce task descriptor.
      arg - Task argument.
      Returns:
      Task result future.
    • executeMapReduceAsync

      default <T, R> CompletableFuture<R> executeMapReduceAsync(TaskDescriptor<T,R> taskDescriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Submits a MapReduceTask of the given class for an execution. A shortcut for submitMapReduce(...).resultAsync().
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      taskDescriptor - Map reduce task descriptor.
      arg - Task argument.
      cancellationToken - Cancellation token or null.
      Returns:
      Task result future.
    • executeMapReduce

      default <T, R> R executeMapReduce(TaskDescriptor<T,R> taskDescriptor, @Nullable T arg)
      Executes a MapReduceTask of the given class.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      taskDescriptor - Map reduce task descriptor.
      arg - Task argument.
      Returns:
      Task result.
      Throws:
      ComputeException - If there is any problem executing the task.
    • executeMapReduce

      <T, R> R executeMapReduce(TaskDescriptor<T,R> taskDescriptor, @Nullable T arg, @Nullable @Nullable CancellationToken cancellationToken)
      Executes a MapReduceTask of the given class.
      Type Parameters:
      T - Job argument (T)ype.
      R - Job (R)esult type.
      Parameters:
      taskDescriptor - Map reduce task descriptor.
      arg - Task argument.
      cancellationToken - Cancellation token or null.
      Returns:
      Task result.
      Throws:
      ComputeException - If there is any problem executing the task.