CompletableFuture.CompleteOnTimeout(Object, Int64, TimeUnit) Method

Definition

Completes this CompletableFuture with the given value if not otherwise completed before the given timeout.

[Android.Runtime.Register("completeOnTimeout", "(Ljava/lang/Object;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/CompletableFuture;", "GetCompleteOnTimeout_Ljava_lang_Object_JLjava_util_concurrent_TimeUnit_Handler", ApiSince=31)]
public virtual Java.Util.Concurrent.ICompletionStage? CompleteOnTimeout (Java.Lang.Object? value, long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("completeOnTimeout", "(Ljava/lang/Object;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/CompletableFuture;", "GetCompleteOnTimeout_Ljava_lang_Object_JLjava_util_concurrent_TimeUnit_Handler", ApiSince=31)>]
abstract member CompleteOnTimeout : Java.Lang.Object * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.ICompletionStage
override this.CompleteOnTimeout : Java.Lang.Object * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.ICompletionStage

Parameters

value
Object

the value to use upon timeout

timeout
Int64

how long to wait before completing normally with the given value, in units of unit

unit
TimeUnit

a TimeUnit determining how to interpret the timeout parameter

Returns

this CompletableFuture

Attributes

Remarks

Completes this CompletableFuture with the given value if not otherwise completed before the given timeout.

Added in 9.

Java documentation for java.util.concurrent.CompletableFuture.completeOnTimeout(T, long, java.util.concurrent.TimeUnit).

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