CompletableFuture.CompleteAsync Method

Definition

Overloads

CompleteAsync(ISupplier)

Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the default executor.

CompleteAsync(ISupplier, IExecutor)

Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the given executor.

CompleteAsync(ISupplier)

Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the default executor.

[Android.Runtime.Register("completeAsync", "(Ljava/util/function/Supplier;)Ljava/util/concurrent/CompletableFuture;", "GetCompleteAsync_Ljava_util_function_Supplier_Handler", ApiSince=31)]
public virtual Java.Util.Concurrent.ICompletionStage? CompleteAsync (Java.Util.Functions.ISupplier? supplier);
[<Android.Runtime.Register("completeAsync", "(Ljava/util/function/Supplier;)Ljava/util/concurrent/CompletableFuture;", "GetCompleteAsync_Ljava_util_function_Supplier_Handler", ApiSince=31)>]
abstract member CompleteAsync : Java.Util.Functions.ISupplier -> Java.Util.Concurrent.ICompletionStage
override this.CompleteAsync : Java.Util.Functions.ISupplier -> Java.Util.Concurrent.ICompletionStage

Parameters

supplier
ISupplier

a function returning the value to be used to complete this CompletableFuture

Returns

this CompletableFuture

Attributes

Remarks

Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the default executor.

Added in 9.

Java documentation for java.util.concurrent.CompletableFuture.completeAsync(java.util.function.Supplier<? extends T>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CompleteAsync(ISupplier, IExecutor)

Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the given executor.

[Android.Runtime.Register("completeAsync", "(Ljava/util/function/Supplier;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;", "GetCompleteAsync_Ljava_util_function_Supplier_Ljava_util_concurrent_Executor_Handler", ApiSince=31)]
public virtual Java.Util.Concurrent.ICompletionStage? CompleteAsync (Java.Util.Functions.ISupplier? supplier, Java.Util.Concurrent.IExecutor? executor);
[<Android.Runtime.Register("completeAsync", "(Ljava/util/function/Supplier;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;", "GetCompleteAsync_Ljava_util_function_Supplier_Ljava_util_concurrent_Executor_Handler", ApiSince=31)>]
abstract member CompleteAsync : Java.Util.Functions.ISupplier * Java.Util.Concurrent.IExecutor -> Java.Util.Concurrent.ICompletionStage
override this.CompleteAsync : Java.Util.Functions.ISupplier * Java.Util.Concurrent.IExecutor -> Java.Util.Concurrent.ICompletionStage

Parameters

supplier
ISupplier

a function returning the value to be used to complete this CompletableFuture

executor
IExecutor

the executor to use for asynchronous execution

Returns

this CompletableFuture

Attributes

Remarks

Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the given executor.

Added in 9.

Java documentation for java.util.concurrent.CompletableFuture.completeAsync(java.util.function.Supplier<? extends T>, java.util.concurrent.Executor).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to