You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2021/03/16 19:31:06 UTC

[GitHub] [fluo] keith-turner commented on a change in pull request #1113: Fluo #1112 - Change CompletableFuture to CompletableFuture

keith-turner commented on a change in pull request #1113:
URL: https://github.com/apache/fluo/pull/1113#discussion_r595481296



##########
File path: modules/api/src/main/java/org/apache/fluo/api/client/LoaderExecutor.java
##########
@@ -48,11 +48,12 @@
 
   /**
    * Same as {@link #execute(Loader)} except it returns a future that completes upon successful
-   * commit and if an exception is thrown in the loader, it will be relayed through the future.
+   * commit and if an exception is thrown in the loader, it will be relayed through the future. The
+   * result of the future is the Loader that was successfully executed.
    *
    * @since 2.0.0
    */
-  CompletableFuture<Void> submit(Loader loader);
+  CompletableFuture<Loader> submit(Loader loader);

Review comment:
       I am not sure of the exact syntax or if its possible, but if this could be tweaked allow user to use their own types it could avoid the user having to cast.  Something like (syntax is wrong):
   
   ```java
   T extends Loader CompletableFuture<T> submit(T loader)
   ```
   
   I am going to circle back and look into proper syntax and semantics later today.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org