pnowojski commented on a change in pull request #10029:  [FLINK-14553][runtime] 
Respect non-blocking output in StreamTask#processInput
URL: https://github.com/apache/flink/pull/10029#discussion_r340016969
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/AvailabilityProvider.java
 ##########
 @@ -29,72 +29,53 @@
 public interface AvailabilityProvider {
        /**
         * Constant that allows to avoid volatile checks {@link 
CompletableFuture#isDone()}. Check
-        * {@link #isAvailable()} for more explanation.
+        * {@link #getAvailableFuture()} for more explanation.
         */
        CompletableFuture<?> AVAILABLE = 
CompletableFuture.completedFuture(null);
 
        /**
-        * Check if this instance is available for further processing.
-        *
-        * <p>When hot looping to avoid volatile access in {@link 
CompletableFuture#isDone()} user of
-        * this method should do the following check:
-        * <pre>
-        * {@code
-        *      AvailabilityProvider input = ...;
-        *      if (input.isAvailable() == AvailabilityProvider.AVAILABLE || 
input.isAvailable().isDone()) {
-        *              // do something;
-        *      }
-        * }
-        * </pre>
-        *
-        * @return a future that is completed if there are more records 
available. If there are more
-        * records available immediately, {@link #AVAILABLE} should be 
returned. Previously returned
-        * not completed futures should become completed once there is more 
input available or if
-        * the input is finished.
+        * @return a future that is completed if the respective provider is 
available.
         */
-       CompletableFuture<?> isAvailable();
+       CompletableFuture<?> getAvailableFuture();
 
 Review comment:
   ~Are we sure we want to rename this? Personally I would prefer the previous 
version and `isAvailable()` was also discussed in at least couple of mailing 
list discussions. If there is no strong argument in one way or another, I would 
like to avoid the confusion of the change.~

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to