Package org.apache.ignite.compute
Interface IgniteCompute
public interface IgniteCompute
Provides the ability to execute Compute jobs.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T,R> Collection<R> execute(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, T arg) Executes aComputeJobof the given class on all nodes in the given node set.<T,R> Collection<R> execute(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, T arg, @Nullable CancellationToken cancellationToken) Executes aComputeJobof the given class on all nodes in the given node set.default <T,R> R execute(JobTarget target, JobDescriptor<T, R> descriptor, T arg) Executes aComputeJobof the given class on a single node from a set of candidate nodes.<T,R> R execute(JobTarget target, JobDescriptor<T, R> descriptor, T arg, @Nullable CancellationToken cancellationToken) Executes aComputeJobof the given class on a single node from a set of candidate nodes.default <T,R> CompletableFuture<Collection<R>> executeAsync(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, T arg) Executes aComputeJobof the given class on all nodes in the given node set.default <T,R> CompletableFuture<Collection<R>> executeAsync(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, T arg, @Nullable CancellationToken cancellationToken) Executes aComputeJobof the given class on all nodes in the given node set.default <T,R> CompletableFuture<R> executeAsync(JobTarget target, JobDescriptor<T, R> descriptor, T arg) Submits aComputeJobof the given class for an execution on a single node from a set of candidate nodes.default <T,R> CompletableFuture<R> executeAsync(JobTarget target, JobDescriptor<T, R> descriptor, T arg, @Nullable CancellationToken cancellationToken) Submits aComputeJobof the given class for an execution on a single node from a set of candidate nodes.default <T,R> R executeMapReduce(TaskDescriptor<T, R> taskDescriptor, T arg) Executes aMapReduceTaskof the given class.<T,R> R executeMapReduce(TaskDescriptor<T, R> taskDescriptor, T arg, @Nullable CancellationToken cancellationToken) Executes aMapReduceTaskof the given class.default <T,R> CompletableFuture<R> executeMapReduceAsync(TaskDescriptor<T, R> taskDescriptor, T arg) Submits aMapReduceTaskof the given class for an execution.default <T,R> CompletableFuture<R> executeMapReduceAsync(TaskDescriptor<T, R> taskDescriptor, T arg, @Nullable CancellationToken cancellationToken) Submits aMapReduceTaskof the given class for an execution.default <T,R> CompletableFuture<BroadcastExecution<R>> submitAsync(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, T arg) Submits aComputeJobof the given class for an execution on all nodes in the given node set.<T,R> CompletableFuture<BroadcastExecution<R>> submitAsync(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, T arg, @Nullable CancellationToken cancellationToken) Submits aComputeJobof the given class for an execution on all nodes in the given node set.default <T,R> CompletableFuture<JobExecution<R>> submitAsync(JobTarget target, JobDescriptor<T, R> descriptor, T arg) Submits aComputeJobof the given class for an execution on a single node from a set of candidate nodes.<T,R> CompletableFuture<JobExecution<R>> submitAsync(JobTarget target, JobDescriptor<T, R> descriptor, T arg, @Nullable CancellationToken cancellationToken) Submits aComputeJobof the given class for an execution on a single node from a set of candidate nodes.default <T,R> TaskExecution<R> submitMapReduce(TaskDescriptor<T, R> taskDescriptor, T arg) Submits aMapReduceTaskof the given class for an execution.<T,R> TaskExecution<R> submitMapReduce(TaskDescriptor<T, R> taskDescriptor, T arg, @Nullable CancellationToken cancellationToken) Submits aMapReduceTaskof the given class for an execution.
-
Method Details
-
submitAsync
default <T,R> CompletableFuture<JobExecution<R>> submitAsync(JobTarget target, JobDescriptor<T, R> descriptor, @Nullable T arg) Submits aComputeJobof 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 aComputeJobof 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 ornull.- 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 aComputeJobof 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 aComputeJobof 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 ornull.- 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 aComputeJobof the given class for an execution on a single node from a set of candidate nodes. A shortcut forsubmit(...).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 aComputeJobof the given class for an execution on a single node from a set of candidate nodes. A shortcut forsubmit(...).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 ornull.- Returns:
- Job result future.
-
executeAsync
default <T,R> CompletableFuture<Collection<R>> executeAsync(BroadcastJobTarget target, JobDescriptor<T, R> descriptor, @Nullable T arg) Executes aComputeJobof 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 aComputeJobof 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 ornull.- Returns:
- Job results future.
-
execute
Executes aComputeJobof 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 aComputeJobof 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 ornull.- 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 aComputeJobof 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 aComputeJobof 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 ornull.- 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 aMapReduceTaskof 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 aMapReduceTaskof 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 ornull.- Returns:
- Task execution interface.
-
executeMapReduceAsync
default <T,R> CompletableFuture<R> executeMapReduceAsync(TaskDescriptor<T, R> taskDescriptor, @Nullable T arg) Submits aMapReduceTaskof the given class for an execution. A shortcut forsubmitMapReduce(...).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 aMapReduceTaskof the given class for an execution. A shortcut forsubmitMapReduce(...).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 ornull.- Returns:
- Task result future.
-
executeMapReduce
Executes aMapReduceTaskof 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 aMapReduceTaskof 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 ornull.- Returns:
- Task result.
- Throws:
ComputeException- If there is any problem executing the task.
-