ptupitsyn commented on code in PR #3920:
URL: https://github.com/apache/ignite-3/pull/3920#discussion_r1639513244
##########
modules/api/src/main/java/org/apache/ignite/compute/ComputeJob.java:
##########
@@ -17,18 +17,22 @@
package org.apache.ignite.compute;
+import java.util.concurrent.CompletableFuture;
+import org.jetbrains.annotations.Nullable;
+
/**
* A Compute job that may be executed on a single Ignite node, on several
nodes, or on the entire cluster.
*
* @param <R> Job result type.
*/
+@SuppressWarnings("InterfaceMayBeAnnotatedFunctional")
public interface ComputeJob<R> {
/**
* Executes the job on an Ignite node.
*
* @param context The execution context.
* @param args Job arguments.
- * @return Job result.
+ * @return Job future. Can be null if the job is synchronous and does not
return any result.
Review Comment:
* Very small performance improvement
* A bit easier for the user at the expense of a one-line check in Ignite code
Do you think we should disallow nulls?
--
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]