flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
/**
	 * Creates a future that is complete once multiple other futures completed.
	 * The future fails (completes exceptionally) once one of the futures in the
	 * conjunction fails. Upon successful completion, the future returns the
	 * collection of the futures' results.
	 *
	 * <p>The ConjunctFuture gives access to how many Futures in the conjunction have already
	 * completed successfully, via {@link ConjunctFuture#getNumFuturesCompleted()}.
	 *
	 * @param futures The futures that make up the conjunction. No null entries are allowed.
	 * @return The ConjunctFuture that completes once all given futures are complete (or one fails).
	 */
Creates a future that is complete once multiple other futures completed.
The future fails (completes exceptionally) once one of the futures in the
conjunction fails. Upon successful completion, the future returns the
collection of the futures' results.

The ConjunctFuture gives access to how many Futures in the conjunction have already
completed successfully, via  ConjunctFuture#getNumFuturesCompleted().

@param futures The futures that make up the conjunction. No null entries are allowed.
@return The ConjunctFuture that completes once all given futures are complete (or one fails).
Creates a future that is complete once multiple other futures completed . The future fails ( completes exceptionally ) once one of the futures in the conjunction fails . Upon successful completion the future returns the collection of the futures ' results . The ConjunctFuture gives access to how many Futures in the conjunction have already completed successfully via ConjunctFuture#getNumFuturesCompleted () . @param futures The futures that make up the conjunction . No null entries are allowed . @return The ConjunctFuture that completes once all given futures are complete ( or one fails ) .
public static <T> ConjunctFuture<Collection<T>> combineAll(Collection<? extends CompletableFuture<? extends T>> futures) {
		checkNotNull(futures, "futures");
		final ResultConjunctFuture<T> conjunct = new ResultConjunctFuture<>(futures.size());
		if (futures.isEmpty()) {
			conjunct.complete(Collections.emptyList());
		}
		else {
			for (CompletableFuture<? extends T> future : futures) {
				future.whenComplete(conjunct::handleCompletedFuture);
			}
		}
		return conjunct;
	}
public static < T > ConjunctFuture < Collection < T > > combineAll ( Collection < ? extends CompletableFuture < ? extends T > > futures ) { checkNotNull ( futures , "futures" ) ; final ResultConjunctFuture < T > conjunct = new ResultConjunctFuture < > ( futures . size ( ) ) ; if ( futures . isEmpty ( ) ) { conjunct . complete ( Collections . emptyList ( ) ) ; } else { for ( CompletableFuture < ? extends T > future : futures ) { future . whenComplete ( conjunct :: handleCompletedFuture ) ; } } return conjunct ; }
Creates a future that is complete once multiple other futures completed.
Creates a future that is complete once multiple other futures completed .