ibessonov commented on code in PR #2936:
URL: https://github.com/apache/ignite-3/pull/2936#discussion_r1420290504
##########
modules/compute/src/main/java/org/apache/ignite/internal/compute/loader/JobContextManager.java:
##########
@@ -100,8 +98,8 @@ public CompletableFuture<JobContext>
acquireClassLoader(List<DeploymentUnit> uni
}
/**
- * Creates a class loader for the given deployment units. The units will
be acquired.
- * The class loader will be closed when it is not used by any other job.
+ * Creates a class loader for the given deployment units. The units will
be acquired. The class loader will be closed when it is not
+ * used by any other job.
Review Comment:
Reformatting unrelated javadocs for no good reason, aren't you?
##########
modules/core/src/main/java/org/apache/ignite/internal/util/CompletableFutures.java:
##########
@@ -82,4 +83,27 @@ public static <T> CompletableFuture<Set<T>>
emptySetCompletedFuture() {
public static <K, V> CompletableFuture<Map<K, V>>
emptyMapCompletedFuture() {
return (CompletableFuture<Map<K, V>>) (CompletableFuture<?>)
EMPTY_MAP_COMPLETED_FUTURE;
}
+
+ /**
+ * Returns a future that is completed when all provided futures complete
(the behavior is identical to {@link CompletableFuture#allOf}).
+ *
+ * <p>If the future completes successfully, it aggregates the results of
the source futures into a {@code List}.
+ *
+ * @param cfs Source futures.
+ * @param <T> Type of the result of the source futures.
+ * @return Future that completes with a list of results from the source
futures.
+ */
+ @SafeVarargs
+ public static <T> CompletableFuture<List<T>> allOf(CompletableFuture<T>...
cfs) {
Review Comment:
This particular name might easily be confused with
`CompletableFuture.allOf`, even the class name is similar. Any ideas for a
better name?
--
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]