Pochatkin commented on code in PR #5016:
URL: https://github.com/apache/ignite-3/pull/5016#discussion_r1914693539


##########
modules/api/src/main/java/org/apache/ignite/compute/IgniteCompute.java:
##########
@@ -47,201 +39,236 @@ public interface IgniteCompute {
      * @param target Execution target.
      * @param descriptor Job descriptor.
      * @param arg Argument of the job.
-     * @return Job execution object.
+     * @return Future of the job execution object which will be completed when 
the job is submitted.
      */
-    <T, R> JobExecution<R> submit(
+    default <T, R> CompletableFuture<JobExecution<R>> submitAsync(
             JobTarget target,
             JobDescriptor<T, R> descriptor,
             @Nullable T arg
-    );
+    ) {
+        return submitAsync(target, descriptor, null, arg);
+    }
 
     /**
-     * Submits a {@link ComputeJob} of the given class for an execution on a 
single node from a set of candidate nodes. A shortcut for
-     * {@code submit(...).resultAsync()}.
+     * Submits a {@link ComputeJob} of the given class for an execution on a 
single node from a set of candidate nodes.
      *
      * @param <T> Job argument (T)ype.
      * @param <R> Job (R)esult type.
      * @param target Execution target.
      * @param descriptor Job descriptor.
+     * @param cancellationToken Cancellation token or {@code null}.
      * @param arg Argument of the job.
-     * @return Job result future.
+     * @return Future of the job execution object which will be completed when 
the job is submitted.
      */
-    default <T, R> CompletableFuture<R> executeAsync(
+    <T, R> CompletableFuture<JobExecution<R>> submitAsync(
             JobTarget target,
             JobDescriptor<T, R> descriptor,
+            @Nullable CancellationToken cancellationToken,

Review Comment:
   Do we really need these overloads?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to