Skip to content

Commit

Permalink
WIP CffuFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Jun 16, 2024
1 parent a3505b9 commit 4b75c9f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public final <T> Cffu<T>[] toCffuArray(CompletionStage<T>... stages) {
* <p>
* If you need the successful results of given stages in the given time, prefer below methods:
* <ul>
* <li>{@link #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])}
* <li>{@link #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])}
* <li>{@link #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage)}
* <li>{@link #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage, CompletionStage, CompletionStage, CompletionStage)}
* </ul>
Expand All @@ -314,7 +314,7 @@ public final <T> Cffu<T>[] toCffuArray(CompletionStage<T>... stages) {
* @see #allResultsOf(CompletionStage[])
* @see #allTupleOf(CompletionStage, CompletionStage)
* @see #allTupleOf(CompletionStage, CompletionStage, CompletionStage, CompletionStage, CompletionStage)
* @see #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])
* @see #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])
* @see #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage)
* @see #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage, CompletionStage, CompletionStage, CompletionStage)
* @see CompletableFutureUtils#allOf(CompletionStage[])
Expand Down Expand Up @@ -366,7 +366,7 @@ public final <T> Cffu<List<T>> allResultsOf(CompletionStage<? extends T>... cfs)
* <p>
* If you need the successful results of given stages in the given time, prefer below methods:
* <ul>
* <li>{@link #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])}
* <li>{@link #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])}
* <li>{@link #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage)}
* <li>{@link #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage, CompletionStage, CompletionStage, CompletionStage)}
* </ul>
Expand All @@ -377,7 +377,7 @@ public final <T> Cffu<List<T>> allResultsOf(CompletionStage<? extends T>... cfs)
* @see #allResultsOfFastFail(CompletionStage[])
* @see #allTupleOfFastFail(CompletionStage, CompletionStage)
* @see #allTupleOfFastFail(CompletionStage, CompletionStage, CompletionStage, CompletionStage, CompletionStage)
* @see #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])
* @see #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])
* @see #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage)
* @see #mostTupleOfSuccess(long, TimeUnit, CompletionStage, CompletionStage, CompletionStage, CompletionStage, CompletionStage)
* @see #allOf(CompletionStage[])
Expand Down Expand Up @@ -418,16 +418,16 @@ public final <T> Cffu<List<T>> allResultsOfFastFail(CompletionStage<? extends T>
* <p>
* If the given stage is successful, its result is the completed value; Otherwise the given valueIfNotSuccess.
*
* @param valueIfNotSuccess the value to return if not completed successfully
* @param timeout how long to wait in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter
* @param valueIfNotSuccess the value to return if not completed successfully
* @param cfs the stages
* @see Cffu#getSuccessNow(Object)
*/
@Contract(pure = true)
@SafeVarargs
public final <T> Cffu<List<T>> mostResultsOfSuccess(
long timeout, TimeUnit unit, @Nullable T valueIfNotSuccess, CompletionStage<? extends T>... cfs) {
@Nullable T valueIfNotSuccess, long timeout, TimeUnit unit, CompletionStage<? extends T>... cfs) {
return create(CompletableFutureUtils.mostResultsOfSuccess(
valueIfNotSuccess, defaultExecutor, timeout, unit, cfs));
}
Expand Down Expand Up @@ -636,7 +636,7 @@ public <T1, T2, T3, T4, T5> Cffu<Tuple5<T1, T2, T3, T4, T5>> allTupleOfFastFail(
* @param timeout how long to wait in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter
* @return a new Cffu that is completed when the given two stages complete
* @see #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])
* @see #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])
* @see Cffu#getSuccessNow(Object)
*/
@Contract(pure = true)
Expand All @@ -654,7 +654,7 @@ public <T1, T2> Cffu<Tuple2<T1, T2>> mostTupleOfSuccess(
* @param timeout how long to wait in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter
* @return a new Cffu that is completed when the given three stages complete
* @see #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])
* @see #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])
* @see Cffu#getSuccessNow(Object)
*/
@Contract(pure = true)
Expand All @@ -673,7 +673,7 @@ public <T1, T2, T3> Cffu<Tuple3<T1, T2, T3>> mostTupleOfSuccess(
* @param timeout how long to wait in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter
* @return a new Cffu that is completed when the given four stages complete
* @see #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])
* @see #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])
* @see Cffu#getSuccessNow(Object)
*/
@Contract(pure = true)
Expand All @@ -693,7 +693,7 @@ public <T1, T2, T3, T4> Cffu<Tuple4<T1, T2, T3, T4>> mostTupleOfSuccess(
* @param timeout how long to wait in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the {@code timeout} parameter
* @return a new Cffu that is completed when the given five stages complete
* @see #mostResultsOfSuccess(long, TimeUnit, Object, CompletionStage[])
* @see #mostResultsOfSuccess(Object, long, TimeUnit, CompletionStage[])
* @see Cffu#getSuccessNow(Object)
*/
@Contract(pure = true)
Expand Down

0 comments on commit 4b75c9f

Please sign in to comment.