Interface ComputeJob<T,R>

Type Parameters:
T - Type of the job argument.
R - Type of the job result.

public interface ComputeJob<T,R>
Core Ignite Compute Job interface. If you want to define your own job, you should implement this interface and deploy the job to the cluster with Deployment API. Then, you can execute this job on the cluster by calling IgniteCompute APIs.

If you want to pass/return custom data structures to/from the job, you should also implement Marshaller and return it from inputMarshaller() and resultMarshaller() methods.

  • Method Details

    • executeAsync

      @Nullable @Nullable CompletableFuture<R> executeAsync(JobExecutionContext context, @Nullable T arg)
      Executes the job on an Ignite node.
      Parameters:
      context - The execution context.
      arg - Job arguments.
      Returns:
      Job future. Can be null if the job is synchronous and does not return any result.
    • inputMarshaller

      @Nullable default @Nullable Marshaller<T,byte[]> inputMarshaller()
      Marshaller for the input argument. Default is null meaning that only primitive types are supported.
      Returns:
      Input marshaller.
    • resultMarshaller

      @Nullable default @Nullable Marshaller<R,byte[]> resultMarshaller()
      Marshaller for the job result. Default is null meaning that only primitive types are supported.
      Returns:
      Result marshaller.