Skip to content

Commit

Permalink
feat: implement the multi-actions methods in `CompletableFutureUtil…
Browse files Browse the repository at this point in the history
…s` ✨
  • Loading branch information
oldratlee committed Jun 15, 2024
1 parent 0bc87bd commit e495734
Show file tree
Hide file tree
Showing 4 changed files with 587 additions and 43 deletions.
14 changes: 7 additions & 7 deletions cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public Cffu<Void> allOf(CompletionStage<?>... cfs) {
}

/**
* Returns a new Cffu with the results in the <strong>same order</strong> of all the given stages,
* Returns a new Cffu with the results in the <strong>same order</strong> of the given stages arguments,
* the new Cffu is completed when all the given stages complete;
* If any of the given stages complete exceptionally, then the returned Cffu also does so,
* with a CompletionException holding this exception as its cause.
Expand Down Expand Up @@ -389,7 +389,7 @@ public Cffu<Void> allOfFastFail(CompletionStage<?>... cfs) {

/**
* Returns a new Cffu that is successful with the results in the <strong>same order</strong>
* of all the given stages when all the given stages success;
* of the given stages arguments when all the given stages success;
* If any of the given stages complete exceptionally, then the returned Cffu also does so
* *without* waiting other incomplete given stages, with a CompletionException holding this exception as its cause.
* If no stages are provided, returns a Cffu completed with the value empty list.
Expand All @@ -414,7 +414,7 @@ public final <T> Cffu<List<T>> allResultsOfFastFail(CompletionStage<? extends T>

/**
* Returns a new Cffu with the most results in the <strong>same order</strong> of
* the given stages in the given time({@code timeout}), aka as many results as possible in the given time.
* the given stages arguments in the given time({@code timeout}, aka as many results as possible in the given time).
* <p>
* If the given stage is successful, its result is the completed value; Otherwise the given valueIfNotSuccess.
*
Expand Down Expand Up @@ -629,7 +629,7 @@ public <T1, T2, T3, T4, T5> Cffu<Tuple5<T1, T2, T3, T4, T5>> allTupleOfFastFail(

/**
* Returns a new Cffu with the most results in the <strong>same order</strong> of
* the given two stages in the given time({@code timeout}), aka as many results as possible in the given time.
* the given two stages arguments in the given time({@code timeout}, aka as many results as possible in the given time).
* <p>
* If the given stage is successful, its result is the completed value; Otherwise the value {@code null}.
*
Expand All @@ -647,7 +647,7 @@ public <T1, T2> Cffu<Tuple2<T1, T2>> mostTupleOfSuccess(

/**
* Returns a new Cffu with the most results in the <strong>same order</strong> of
* the given three stages in the given time({@code timeout}), aka as many results as possible in the given time.
* the given three stages arguments in the given time({@code timeout}, aka as many results as possible in the given time).
* <p>
* If the given stage is successful, its result is the completed value; Otherwise the value {@code null}.
*
Expand All @@ -666,7 +666,7 @@ public <T1, T2, T3> Cffu<Tuple3<T1, T2, T3>> mostTupleOfSuccess(

/**
* Returns a new Cffu with the most results in the <strong>same order</strong> of
* the given four stages in the given time({@code timeout}), aka as many results as possible in the given time.
* the given four stages arguments in the given time({@code timeout}, aka as many results as possible in the given time).
* <p>
* If the given stage is successful, its result is the completed value; Otherwise the value {@code null}.
*
Expand All @@ -686,7 +686,7 @@ public <T1, T2, T3, T4> Cffu<Tuple4<T1, T2, T3, T4>> mostTupleOfSuccess(

/**
* Returns a new Cffu with the most results in the <strong>same order</strong> of
* the given five stages in the given time({@code timeout}), aka as many results as possible in the given time.
* the given five stages arguments in the given time({@code timeout}, aka as many results as possible in the given time).
* <p>
* If the given stage is successful, its result is the completed value; Otherwise the value {@code null}.
*
Expand Down
Loading

0 comments on commit e495734

Please sign in to comment.