[
https://issues.apache.org/jira/browse/IGNITE-24174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn updated IGNITE-24174:
------------------------------------
Fix Version/s: 3.0
> 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
> Fix For: 3.0
>
> 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)