CompletableFuture.Get Method

Definition

Overloads

Get()

Waits if necessary for this future to complete, and then returns its result.

Get(Int64, TimeUnit)

Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.

Get()

Waits if necessary for this future to complete, and then returns its result.

[Android.Runtime.Register("get", "()Ljava/lang/Object;", "GetGetHandler", ApiSince=24)]
public virtual Java.Lang.Object? Get ();
[<Android.Runtime.Register("get", "()Ljava/lang/Object;", "GetGetHandler", ApiSince=24)>]
abstract member Get : unit -> Java.Lang.Object
override this.Get : unit -> Java.Lang.Object

Returns

the result value

Implements

Attributes

Remarks

Waits if necessary for this future to complete, and then returns its result.

Java documentation for java.util.concurrent.CompletableFuture.get().

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

Get(Int64, TimeUnit)

Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.

[Android.Runtime.Register("get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetGet_JLjava_util_concurrent_TimeUnit_Handler", ApiSince=24)]
public virtual Java.Lang.Object? Get (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetGet_JLjava_util_concurrent_TimeUnit_Handler", ApiSince=24)>]
abstract member Get : int64 * Java.Util.Concurrent.TimeUnit -> Java.Lang.Object
override this.Get : int64 * Java.Util.Concurrent.TimeUnit -> Java.Lang.Object

Parameters

timeout
Int64

the maximum time to wait

unit
TimeUnit

the time unit of the timeout argument

Returns

the result value

Implements

Attributes

Remarks

Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.

Java documentation for java.util.concurrent.CompletableFuture.get(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