Index
All Classes and Interfaces|All Packages|Serialized Form
A
- acceptEither(CompletionStage<? extends T>, Consumer<? super T>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, is executed with the corresponding result as argument to the supplied action.
- acceptEitherAsync(CompletionStage<? extends T>, Consumer<? super T>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, is executed using
Cffu.defaultExecutor(), with the corresponding result as argument to the supplied action. - acceptEitherAsync(CompletionStage<? extends T>, Consumer<? super T>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied action.
- allOf() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "allOf is ambiguous" problem when call
allOfwith empty arguments:cffuFactory.allOf(). - allOf(Cffu<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when all the given Cffus complete.
- allOf(CompletableFuture<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when all the given CompletableFutures complete.
- allOfFastFail() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "allOfFastFail is ambiguous" problem when call
allOfFastFailwith empty arguments:cffuFactory.allOfFastFail(). - allOfFastFail(Cffu<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that success when all the given Cffus success, the results(
Cffu<Void>) of the given Cffus are not reflected in the returned Cffu, but may be obtained by inspecting them individually. - allOfFastFail(CompletableFuture<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that success when all the given CompletableFutures success, the results(
Cffu<Void>) of the given CompletableFutures are not reflected in the returned Cffu, but may be obtained by inspecting them individually. - allOfFastFail(CompletableFuture<?>...) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that success when all the given CompletableFutures success, the results(
CompletableFuture<Void>) of the given CompletableFutures are not reflected in the returned CompletableFuture, but may be obtained by inspecting them individually. - allOfFastFailWithResult(CompletableFuture<T>...) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture with the results of all the given CompletableFutures, the new CompletableFuture success when all the given CompletableFutures success.
- allOfWithResult(CompletableFuture<T>...) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture with the results of all the given CompletableFutures, the new CompletableFuture is completed when all the given CompletableFutures complete.
- anyOf() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "anyOf is ambiguous" problem when call
anyOfwith empty arguments:cffuFactory.anyOf(). - anyOf(Cffu<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when any of the given Cffus complete, with the same result.
Otherwise, if it completed exceptionally, the returned Cffu also does so, with a CompletionException holding this exception as its cause.
If no Cffus are provided, returns an incomplete Cffu. - anyOf(CompletableFuture<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Same as
CffuFactory.anyOf(Cffu[])with overloaded argument typeCompletableFuture. - anyOfSuccess() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "cffuAnyOfSuccess is ambiguous" problem when call
anyOfSuccesswith empty arguments:cffuFactory.anyOfSuccess(). - anyOfSuccess(Cffu<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that success when any of the given Cffus success, with the same result.
- anyOfSuccess(CompletableFuture<?>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that success when any of the given CompletableFutures success, with the same result.
- anyOfSuccess(CompletableFuture<?>...) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that success when any of the given CompletableFutures success, with the same result.
- anyOfSuccessWithType(CompletableFuture<T>...) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that success when any of the given CompletableFutures success, with the same result.
- anyOfWithType(CompletableFuture<T>...) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is completed when any of the given CompletableFutures complete, with the same result.
- applyToEither(CompletionStage<? extends T>, Function<? super T, U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, is executed with the corresponding result as argument to the supplied function.
- applyToEitherAsync(CompletionStage<? extends T>, Function<? super T, U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, is executed using
Cffu.defaultExecutor(), with the corresponding result as argument to the supplied function. - applyToEitherAsync(CompletionStage<? extends T>, Function<? super T, U>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied function.
- asCffu(CompletionStage<T>) - Method in class io.foldright.cffu.CffuFactory
- asCffuArray(CompletionStage<T>...) - Method in class io.foldright.cffu.CffuFactory
-
A convenient util method for wrap input
CompletableFuture/CompletionStage/Cffuarray element byCffuFactory.asCffu(CompletionStage).
B
- build() - Method in class io.foldright.cffu.CffuFactoryBuilder
C
- cancel(boolean) - Method in class io.foldright.cffu.Cffu
-
If not already completed, completes this Cffu with a
CancellationException. - CANCELLED - Enum constant in enum class io.foldright.cffu.CffuState
-
The task was cancelled.
- Cffu<T> - Class in io.foldright.cffu
-
This class
Cffuis the equivalent class toCompletableFuture, contains the equivalent instance methods ofCompletionStageandCompletableFuture. - cffuAllOf() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "cffuAllOf is ambiguous" problem when call
cffuAllOfwith empty arguments:cffuFactory.cffuAllOf(). - cffuAllOf(Cffu<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu with the results of all the given Cffus, the new Cffu is completed when all the given Cffus complete.
- cffuAllOf(CompletableFuture<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu with the results of all the given CompletableFutures, the new Cffu is completed when all the given CompletableFutures complete.
- cffuAllOfFastFail() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "cffuAllOfFastFail is ambiguous" problem when call
cffuAllOfFastFailwith empty arguments:cffuFactory.cffuAllOfFastFail(). - cffuAllOfFastFail(Cffu<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu with the results of all the given Cffus, the new Cffu success when all the given Cffus success.
- cffuAllOfFastFail(CompletableFuture<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu with the results of all the given CompletableFutures, the new Cffu success when all the given CompletableFutures success.
- cffuAnyOf() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "cffuAnyOf is ambiguous" problem when call
cffuAnyOfwith empty arguments:cffuFactory.cffuAnyOf(). - cffuAnyOf(Cffu<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when any of the given Cffus complete, with the same result.
- cffuAnyOf(CompletableFuture<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when any of the given CompletableFutures complete, with the same result.
- cffuAnyOfSuccess() - Method in class io.foldright.cffu.CffuFactory
-
Provided this overloaded method just for resolving "cffuAnyOfSuccess is ambiguous" problem when call
cffuAnyOfSuccesswith empty arguments:cffuFactory.cffuAnyOfSuccess(). - cffuAnyOfSuccess(Cffu<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that success when any of the given Cffus success, with the same result.
- cffuAnyOfSuccess(CompletableFuture<T>...) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that success when any of the given CompletableFutures success, with the same result.
- cffuArrayUnwrap(Cffu<T>...) - Static method in class io.foldright.cffu.CffuFactory
-
A convenient util method for unwrap input
Cffuarray elements byCffu.cffuUnwrap(). - cffuCombine(Cffu<T1>, Cffu<T2>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given two Cffus complete.
- cffuCombine(Cffu<T1>, Cffu<T2>, Cffu<T3>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given three Cffus complete.
- cffuCombine(Cffu<T1>, Cffu<T2>, Cffu<T3>, Cffu<T4>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given 4 Cffus complete.
- cffuCombine(Cffu<T1>, Cffu<T2>, Cffu<T3>, Cffu<T4>, Cffu<T5>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given 5 Cffus complete.
- cffuCombine(Cffu<T2>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(Cffu, Cffu), providing this method is convenient for method chaining. - cffuCombine(Cffu<T2>, Cffu<T3>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(Cffu, Cffu, Cffu), providing this method is convenient for method chaining. - cffuCombine(Cffu<T2>, Cffu<T3>, Cffu<T4>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(Cffu, Cffu, Cffu, Cffu), providing this method is convenient for method chaining. - cffuCombine(Cffu<T2>, Cffu<T3>, Cffu<T4>, Cffu<T5>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(Cffu, Cffu, Cffu, Cffu, Cffu), providing this method is convenient for method chaining. - cffuCombine(CompletableFuture<T1>, CompletableFuture<T2>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given two CompletableFutures complete.
- cffuCombine(CompletableFuture<T1>, CompletableFuture<T2>, CompletableFuture<T3>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given three CompletableFutures complete.
- cffuCombine(CompletableFuture<T1>, CompletableFuture<T2>, CompletableFuture<T3>, CompletableFuture<T4>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given 4 CompletableFutures complete.
- cffuCombine(CompletableFuture<T1>, CompletableFuture<T2>, CompletableFuture<T3>, CompletableFuture<T4>, CompletableFuture<T5>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is completed when the given 5 CompletableFutures complete.
- cffuCombine(CompletableFuture<T2>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(CompletableFuture, CompletableFuture), providing this method is convenient for method chaining. - cffuCombine(CompletableFuture<T2>, CompletableFuture<T3>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(CompletableFuture, CompletableFuture, CompletableFuture), providing this method is convenient for method chaining. - cffuCombine(CompletableFuture<T2>, CompletableFuture<T3>, CompletableFuture<T4>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(CompletableFuture, CompletableFuture, CompletableFuture, CompletableFuture), providing this method is convenient for method chaining. - cffuCombine(CompletableFuture<T2>, CompletableFuture<T3>, CompletableFuture<T4>, CompletableFuture<T5>) - Method in class io.foldright.cffu.Cffu
-
Same as
CffuFactory.cffuCombine(CompletableFuture, CompletableFuture, CompletableFuture, CompletableFuture, CompletableFuture), providing this method is convenient for method chaining. - cffuFactory() - Method in class io.foldright.cffu.Cffu
-
Returns the
CffuFactoryof this Cffu. - CffuFactory - Class in io.foldright.cffu
-
This class
CffuFactoryis equivalent toCompletableFuture, contains the static factory methods ofCompletableFuture. - CffuFactoryBuilder - Class in io.foldright.cffu
-
CffuFactoryBuilderis the builder ofCffuFactory. - cffuJoin(long, TimeUnit) - Method in class io.foldright.cffu.Cffu
-
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result value when complete, or throws an (unchecked) exception if completed exceptionally.
- cffuJoin(CompletableFuture<T>, long, TimeUnit) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result value when complete, or throws an (unchecked) exception if completed exceptionally.
- cffuListToArray(List<Cffu<T>>) - Static method in class io.foldright.cffu.CffuFactory
-
Convert Cffu list to Cffu array.
- cffuState() - Method in class io.foldright.cffu.Cffu
-
Returns the computation state(
CffuState). - cffuState(CompletableFuture<T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns the computation state(
CffuState), this method has java version compatibility logic, so you can invoke in oldjava 18-. - CffuState - Enum Class in io.foldright.cffu
- cffuUnwrap() - Method in class io.foldright.cffu.Cffu
-
Returns the underneath wrapped CompletableFuture.
- combine(CompletableFuture<T1>, CompletableFuture<T2>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is completed when the given two CompletableFutures complete.
- combine(CompletableFuture<T1>, CompletableFuture<T2>, CompletableFuture<T3>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is completed when the given three CompletableFutures complete.
- combine(CompletableFuture<T1>, CompletableFuture<T2>, CompletableFuture<T3>, CompletableFuture<T4>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is completed when the given 4 CompletableFutures complete.
- combine(CompletableFuture<T1>, CompletableFuture<T2>, CompletableFuture<T3>, CompletableFuture<T4>, CompletableFuture<T5>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is completed when the given 5 CompletableFutures complete.
- completableFutureListToArray(List<CompletableFuture<T>>) - Static method in class io.foldright.cffu.CffuFactory
-
Convert CompletableFuture list to CompletableFuture array.
- CompletableFutureUtils - Class in io.foldright.cffu
-
This class contains the enhanced methods for
CompletableFuture. - complete(T) - Method in class io.foldright.cffu.Cffu
-
If not already completed, sets the value returned by
Cffu.get()and related methods to the given value. - completeAsync(CompletableFuture<T>, Supplier<? extends T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Completes given CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the default executor.
- completeAsync(CompletableFuture<T>, Supplier<? extends T>, Executor) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Completes given CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the given executor.
- completeAsync(Supplier<? extends T>) - Method in class io.foldright.cffu.Cffu
-
Completes this Cffu with the result of the given Supplier function invoked from an asynchronous task using
Cffu.defaultExecutor(). - completeAsync(Supplier<? extends T>, Executor) - Method in class io.foldright.cffu.Cffu
-
Completes this Cffu with the result of the given Supplier function invoked from an asynchronous task using the given executor.
- completedFuture(T) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is already completed with the given value.
- completedStage(T) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new CompletionStage that is already completed with the given value and supports only those methods in interface
CompletionStage. - completedStage(T) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that is already completed with the given value and supports only those methods in interface
CompletionStage. - completeExceptionally(Throwable) - Method in class io.foldright.cffu.Cffu
-
If not already completed, causes invocations of
Cffu.get()and related methods to throw the given exception. - completeOnTimeout(CompletableFuture<T>, T, long, TimeUnit) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Completes given CompletableFuture with the given value if not otherwise completed before the given timeout.
- completeOnTimeout(T, long, TimeUnit) - Method in class io.foldright.cffu.Cffu
-
Completes this Cffu with the given value if not otherwise completed before the given timeout.
- copy() - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that is completed normally with the same value as this Cffu when it completes normally.
- copy(CompletableFuture<T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is completed normally with the same value as this CompletableFuture when it completes normally.
D
- defaultExecutor() - Method in class io.foldright.cffu.Cffu
-
Returns the default Executor used for async methods that do not specify an Executor.
- defaultExecutor() - Method in class io.foldright.cffu.CffuFactory
-
Returns
defaultExecutor. - defaultExecutor() - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns the default Executor used for async methods that do not specify an Executor.
- delayedExecutor(long, TimeUnit) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Executor that submits a task to the default executor after the given delay (or no delay if non-positive).
- delayedExecutor(long, TimeUnit) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new Executor that submits a task to the default executor after the given delay (or no delay if non-positive).
- delayedExecutor(long, TimeUnit, Executor) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Executor that submits a task to the given base executor after the given delay (or no delay if non-positive).
- delayedExecutor(long, TimeUnit, Executor) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new Executor that submits a task to the given base executor after the given delay (or no delay if non-positive).
E
- equals(Object) - Method in class io.foldright.cffu.tuple.Tuple2
- equals(Object) - Method in class io.foldright.cffu.tuple.Tuple3
- equals(Object) - Method in class io.foldright.cffu.tuple.Tuple4
- equals(Object) - Method in class io.foldright.cffu.tuple.Tuple5
- exceptionally(Function<Throwable, ? extends T>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function.
- exceptionallyAsync(CompletableFuture<T>, Function<Throwable, ? extends T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that, when given stage completes exceptionally, is executed with given stage's exception as the argument to the supplied function, using given stage's default asynchronous execution facility.
- exceptionallyAsync(CompletableFuture<T>, Function<Throwable, ? extends T>, Executor) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that, when given stage completes exceptionally, is executed with given stage's exception as the argument to the supplied function, using the supplied Executor.
- exceptionallyAsync(Function<Throwable, ? extends T>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function, using
Cffu.defaultExecutor(). - exceptionallyAsync(Function<Throwable, ? extends T>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function, using the supplied Executor.
- exceptionallyCompose(CompletableFuture<T>, Function<Throwable, ? extends CompletionStage<T>>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that, when given stage completes exceptionally, is composed using the results of the supplied function applied to given stage's exception.
- exceptionallyCompose(Function<Throwable, ? extends CompletionStage<T>>) - Method in class io.foldright.cffu.Cffu
-
Returns a new CompletionStage that, when this stage completes exceptionally, is composed using the results of the supplied function applied to this stage's exception.
- exceptionallyComposeAsync(CompletableFuture<T>, Function<Throwable, ? extends CompletionStage<T>>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that, when given stage completes exceptionally, is composed using the results of the supplied function applied to given stage's exception, using given stage's default asynchronous execution facility.
- exceptionallyComposeAsync(CompletableFuture<T>, Function<Throwable, ? extends CompletionStage<T>>, Executor) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that, when given stage completes exceptionally, is composed using the results of the supplied function applied to given stage's exception, using the supplied Executor.
- exceptionallyComposeAsync(Function<Throwable, ? extends CompletionStage<T>>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes exceptionally, is composed using the results of the supplied function applied to this stage's exception, using
Cffu.defaultExecutor(). - exceptionallyComposeAsync(Function<Throwable, ? extends CompletionStage<T>>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes exceptionally, is composed using the results of the supplied function applied to this stage's exception, using the supplied Executor.
- exceptionNow() - Method in class io.foldright.cffu.Cffu
-
Returns the exception thrown by the task, without waiting.
- exceptionNow(CompletableFuture<T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns the exception thrown by the task, without waiting.
F
- FAILED - Enum constant in enum class io.foldright.cffu.CffuState
-
The task completed with an exception.
- failedFuture(Throwable) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is already completed exceptionally with the given exception.
- failedFuture(Throwable) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletableFuture that is already completed exceptionally with the given exception.
- failedStage(Throwable) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new CompletionStage that is already completed exceptionally with the given exception and supports only those methods in interface
CompletionStage. - failedStage(Throwable) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that is already completed exceptionally with the given exception and supports only those methods in interface
CompletionStage. - forbidObtrudeMethods() - Method in class io.foldright.cffu.Cffu
-
Returns
forbidObtrudeMethodsor not. - forbidObtrudeMethods() - Method in class io.foldright.cffu.CffuFactory
-
Returns
forbidObtrudeMethodsor not. - forbidObtrudeMethods(boolean) - Method in class io.foldright.cffu.CffuFactoryBuilder
-
Set
forbidObtrudeMethodsor not.
G
- get() - Method in class io.foldright.cffu.Cffu
-
Waits if necessary for the computation to complete, and then retrieves its result.
- get(long, TimeUnit) - Method in class io.foldright.cffu.Cffu
-
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
- getNow(T) - Method in class io.foldright.cffu.Cffu
-
Returns the result value (or throws any encountered exception) if completed, else returns the given valueIfAbsent.
- getNumberOfDependents() - Method in class io.foldright.cffu.Cffu
-
Returns the estimated number of Cffus whose completions are awaiting completion of this Cffu.
H
- handle(BiFunction<? super T, Throwable, ? extends U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes either normally or exceptionally, is executed with this stage's result and exception as arguments to the supplied function.
- handleAsync(BiFunction<? super T, Throwable, ? extends U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes either normally or exceptionally, is executed using
Cffu.defaultExecutor(), with this stage's result and exception as arguments to the supplied function. - handleAsync(BiFunction<? super T, Throwable, ? extends U>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes either normally or exceptionally, is executed using the supplied executor, with this stage's result and exception as arguments to the supplied function.
- hashCode() - Method in class io.foldright.cffu.tuple.Tuple2
- hashCode() - Method in class io.foldright.cffu.tuple.Tuple3
- hashCode() - Method in class io.foldright.cffu.tuple.Tuple4
- hashCode() - Method in class io.foldright.cffu.tuple.Tuple5
I
- io.foldright.cffu - package io.foldright.cffu
-
A tiny 0-dependency sidekick library for CompletableFuture to improve user experience and reduce misuse.
- io.foldright.cffu.tuple - package io.foldright.cffu.tuple
-
the
Tupleutil classes forCffuuse. - isCancelled() - Method in class io.foldright.cffu.Cffu
-
Returns
trueif this Cffu was cancelled before it completed normally. - isCompletedExceptionally() - Method in class io.foldright.cffu.Cffu
-
Returns
trueif this Cffu completed exceptionally, in any way. - isDone() - Method in class io.foldright.cffu.Cffu
-
Returns
trueif this task completed. - isMinimalStage() - Method in class io.foldright.cffu.Cffu
-
Returns whether is a
minimal stageor not.
J
- join() - Method in class io.foldright.cffu.Cffu
-
Returns the result value when complete, or throws an (unchecked) exception if completed exceptionally.
M
- minimalCompletionStage() - Method in class io.foldright.cffu.Cffu
-
Returns a new CompletionStage that is completed normally with the same value as this CompletableFuture when it completes normally, and cannot be independently completed or otherwise used in ways not defined by the methods of interface
CompletionStage. - minimalCompletionStage(CompletableFuture<T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new CompletionStage that is completed normally with the same value as given CompletableFuture when it completes normally, and cannot be independently completed or otherwise used in ways not defined by the methods of interface
CompletionStage.
N
- newCffuFactoryBuilder(Executor) - Static method in class io.foldright.cffu.CffuFactoryBuilder
-
Returns a
CffuFactoryBuilderwithdefaultExecutorsetting. - newIncompleteCffu() - Method in class io.foldright.cffu.CffuFactory
-
Return an incomplete Cffu, equivalent to
CompletableFuture()constructor. - newIncompleteFuture() - Method in class io.foldright.cffu.Cffu
-
Returns a new incomplete Cffu with CompletableFuture of the type to be returned by a CompletionStage method.
- newIncompleteFuture(CompletableFuture<T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns a new incomplete CompletableFuture of the type to be returned by a CompletionStage method.
- NoCfsProvidedException - Exception Class in io.foldright.cffu
-
Exception indicates that NO cfs(
Cffu/CompletableFuture) are provided for methods require cf arguments. - NoCfsProvidedException() - Constructor for exception class io.foldright.cffu.NoCfsProvidedException
O
- obtrudeException(Throwable) - Method in class io.foldright.cffu.Cffu
-
Forcibly causes subsequent invocations of method
Cffu.get()and related methods to throw the given exception, whether or not already completed. - obtrudeValue(T) - Method in class io.foldright.cffu.Cffu
-
Forcibly sets or resets the value subsequently returned by method
Cffu.get()and related methods, whether or not already completed. - of(T1, T2) - Static method in class io.foldright.cffu.tuple.Tuple2
- of(T1, T2, T3) - Static method in class io.foldright.cffu.tuple.Tuple3
- of(T1, T2, T3, T4) - Static method in class io.foldright.cffu.tuple.Tuple4
- of(T1, T2, T3, T4, T5) - Static method in class io.foldright.cffu.tuple.Tuple5
- orTimeout(long, TimeUnit) - Method in class io.foldright.cffu.Cffu
-
Exceptionally completes this Cffu with a
TimeoutExceptionif not otherwise completed before the given timeout. - orTimeout(CompletableFuture<T>, long, TimeUnit) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Exceptionally completes given CompletableFuture with a
TimeoutExceptionif not otherwise completed before the given timeout.
R
- resetCffuFactory(CffuFactory) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu with given CffuFactory(contained configuration) that is completed normally with the same value as this Cffu when it completes normally.
- resultNow() - Method in class io.foldright.cffu.Cffu
-
Returns the computed result, without waiting.
- resultNow(CompletableFuture<T>) - Static method in class io.foldright.cffu.CompletableFutureUtils
-
Returns the computed result, without waiting.
- runAfterBoth(CompletionStage<?>, Runnable) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, executes the given action.
- runAfterBothAsync(CompletionStage<?>, Runnable) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, executes the given action using
Cffu.defaultExecutor(). - runAfterBothAsync(CompletionStage<?>, Runnable, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, executes the given action using the supplied executor.
- runAfterEither(CompletionStage<?>, Runnable) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, executes the given action.
- runAfterEitherAsync(CompletionStage<?>, Runnable) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, executes the given action using
Cffu.defaultExecutor(). - runAfterEitherAsync(CompletionStage<?>, Runnable, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when either this or the other given stage complete normally, executes the given action using the supplied executor.
- runAsync(Runnable) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is asynchronously completed by a task running in the
CffuFactory.defaultExecutor()after it runs the given action. - runAsync(Runnable, Executor) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is asynchronously completed by a task running in the given executor after it runs the given action.
- RUNNING - Enum constant in enum class io.foldright.cffu.CffuState
-
The task has not completed.
S
- state() - Method in class io.foldright.cffu.Cffu
-
Returns the computation state, this method just invoke without java version compatibility logic, if you need this function backport into old
java 18-, useCffu.cffuState()instead. - SUCCESS - Enum constant in enum class io.foldright.cffu.CffuState
-
The task completed with a result.
- supplyAsync(Supplier<T>) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is asynchronously completed by a task running in the
CffuFactory.defaultExecutor()with the value obtained by calling the given Supplier. - supplyAsync(Supplier<T>, Executor) - Method in class io.foldright.cffu.CffuFactory
-
Returns a new Cffu that is asynchronously completed by a task running in the given executor with the value obtained by calling the given Supplier.
T
- thenAccept(Consumer<? super T>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, is executed with this stage's result as the argument to the supplied action.
- thenAcceptAsync(Consumer<? super T>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, is executed using
Cffu.defaultExecutor(), with this stage's result as the argument to the supplied action. - thenAcceptAsync(Consumer<? super T>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, is executed using the supplied Executor, with this stage's result as the argument to the supplied action.
- thenAcceptBoth(CompletionStage<? extends U>, BiConsumer<? super T, ? super U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, is executed with the two results as arguments to the supplied action.
- thenAcceptBothAsync(CompletionStage<? extends U>, BiConsumer<? super T, ? super U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, is executed using
Cffu.defaultExecutor(), with the two results as arguments to the supplied action. - thenAcceptBothAsync(CompletionStage<? extends U>, BiConsumer<? super T, ? super U>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, is executed using the supplied executor, with the two results as arguments to the supplied action.
- thenApply(Function<? super T, ? extends U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, is executed with this stage's result as the argument to the supplied function.
- thenApplyAsync(Function<? super T, ? extends U>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, is executed using
Cffu.defaultExecutor(), with this stage's result as the argument to the supplied function. - thenApplyAsync(Function<? super T, ? extends U>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, is executed using the supplied Executor, with this stage's result as the argument to the supplied function.
- thenCombine(CompletionStage<? extends U>, BiFunction<? super T, ? super U, ? extends V>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, is executed with the two results as arguments to the supplied function.
- thenCombineAsync(CompletionStage<? extends U>, BiFunction<? super T, ? super U, ? extends V>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, is executed using
Cffu.defaultExecutor(), with the two results as arguments to the supplied function. - thenCombineAsync(CompletionStage<? extends U>, BiFunction<? super T, ? super U, ? extends V>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this and the other given stage both complete normally, is executed using the supplied executor, with the two results as arguments to the supplied function.
- thenCompose(Function<? super T, ? extends CompletionStage<U>>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that is completed with the same value as the CompletionStage returned by the given function.
- thenComposeAsync(Function<? super T, ? extends CompletionStage<U>>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that is completed with the same value as the CompletionStage returned by the given function, executed using
Cffu.defaultExecutor(). - thenComposeAsync(Function<? super T, ? extends CompletionStage<U>>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that is completed with the same value as the CompletionStage returned by the given function, executed using the supplied Executor.
- thenRun(Runnable) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, executes the given action.
- thenRunAsync(Runnable) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, executes the given action using
Cffu.defaultExecutor(). - thenRunAsync(Runnable, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu that, when this stage completes normally, executes the given action using the supplied Executor.
- toCffuState(Future.State) - Static method in enum class io.foldright.cffu.CffuState
-
Convert
Future.StatetoCffuState. - toCompletableFuture() - Method in class io.foldright.cffu.Cffu
-
Returns a
CompletableFuturemaintaining the same completion properties as this stage. - toCompletableFutureArray(CompletionStage<T>...) - Static method in class io.foldright.cffu.CffuFactory
-
A convenient util method for converting input
Cffu/CompletableFuture/CompletionStagearray element byCffu.toCompletableFuture()/CompletableFuture.toCompletableFuture()/CompletionStage.toCompletableFuture(). - toFutureState() - Method in enum class io.foldright.cffu.CffuState
-
Convert
CffuStatetoFuture.State. - toString() - Method in class io.foldright.cffu.Cffu
-
Returns a string identifying this Cffu, as well as its completion state.
- toString() - Method in class io.foldright.cffu.tuple.Tuple2
- toString() - Method in class io.foldright.cffu.tuple.Tuple3
- toString() - Method in class io.foldright.cffu.tuple.Tuple4
- toString() - Method in class io.foldright.cffu.tuple.Tuple5
- Tuple2<T1,
T2> - Class in io.foldright.cffu.tuple -
Tuple2(aka Pair).
- Tuple3<T1,
T2, T3> - Class in io.foldright.cffu.tuple -
Tuple3(aka Triple).
- Tuple4<T1,
T2, T3, T4> - Class in io.foldright.cffu.tuple -
Tuple4, contains 4 elements.
- Tuple5<T1,
T2, T3, T4, T5> - Class in io.foldright.cffu.tuple -
Tuple5, contains 5 elements.
V
- valueOf(String) - Static method in enum class io.foldright.cffu.CffuState
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class io.foldright.cffu.CffuState
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- whenComplete(BiConsumer<? super T, ? super Throwable>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu with the same result or exception as this stage, that executes the given action when this stage completes.
- whenCompleteAsync(BiConsumer<? super T, ? super Throwable>) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu with the same result or exception as this stage, that executes the given action using
Cffu.defaultExecutor()when this stage completes. - whenCompleteAsync(BiConsumer<? super T, ? super Throwable>, Executor) - Method in class io.foldright.cffu.Cffu
-
Returns a new Cffu with the same result or exception as this stage, that executes the given action using the supplied Executor when this stage completes.
_
- _1 - Variable in class io.foldright.cffu.tuple.Tuple2
- _1 - Variable in class io.foldright.cffu.tuple.Tuple3
- _1 - Variable in class io.foldright.cffu.tuple.Tuple4
- _1 - Variable in class io.foldright.cffu.tuple.Tuple5
- _2 - Variable in class io.foldright.cffu.tuple.Tuple2
- _2 - Variable in class io.foldright.cffu.tuple.Tuple3
- _2 - Variable in class io.foldright.cffu.tuple.Tuple4
- _2 - Variable in class io.foldright.cffu.tuple.Tuple5
- _3 - Variable in class io.foldright.cffu.tuple.Tuple3
- _3 - Variable in class io.foldright.cffu.tuple.Tuple4
- _3 - Variable in class io.foldright.cffu.tuple.Tuple5
- _4 - Variable in class io.foldright.cffu.tuple.Tuple4
- _4 - Variable in class io.foldright.cffu.tuple.Tuple5
- _5 - Variable in class io.foldright.cffu.tuple.Tuple5
All Classes and Interfaces|All Packages|Serialized Form