[ https://issues.apache.org/jira/browse/IGNITE-24174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913226#comment-17913226 ]
Pavel Tupitsyn commented on IGNITE-24174: ----------------------------------------- Looks good to me. Merged to main: [d5957d024d8f5b4163f13c11306c5b4b670e1531|https://github.com/apache/ignite-3/commit/d5957d024d8f5b4163f13c11306c5b4b670e1531] > Unify compute API > ----------------- > > Key: IGNITE-24174 > URL: https://issues.apache.org/jira/browse/IGNITE-24174 > Project: Ignite > Issue Type: Improvement > Components: compute > Reporter: Vadim Pakhnushev > Assignee: Vadim Pakhnushev > Priority: Major > Labels: ignite-3 > Time Spent: 1h 20m > Remaining Estimate: 0h > > While investigating IGNITE-23601, it was found that the existing compute API > could be unified as follows: > {code:java} > CompletableFuture<JobExecution<R>> submitAsync(JobTarget target, > CancellationToken cancellationToken, ...); > CompletableFuture<BroadcastExecution<R>> submitAsync(BroadcastJobTarget > target, CancellationToken cancellationToken, ...); > CompletableFuture<R> executeAsync(JobTarget target, CancellationToken > cancellationToken, ...); // shorthand for > submitAsync().thenCompose(JobExecution::resultAsync); > CompletableFuture<Collection<R>> executeAsync(BroadcastJobTarget target, > CancellationToken cancellationToken, ...); // shorthand for > submitAsync().thenCompose(BroadcastExecution::resultAsync); > R execute(JobTarget target, CancellationToken cancellationToken, ...); > Collection<R> execute(BroadcastJobTarget target, CancellationToken > cancellationToken, ...); > interface BroadcastExecution { > Collection<JobExecution<R>> executions(); > CompletableFuture<Collection<R>> resultsAsync(); > } > {code} > Remove {{submit}} methods. > Remove {{cancelAsync}} from the {{JobExecution}} and {{TaskExecution}}, > cancelling should be done only via {{CancellationToken}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)