Top Description Methods
org.newsclub.net.unix

pack-priv Interface AFFuture<T>

Annotations
@FunctionalInterface
Type Parameters
<T>
the type of results supplied by this supplier
Imports
java.util.concurrent.CancellationException, .ExecutionException, .Future, org.eclipse.jdt.annotation.Nullable

junixsocket-internal variant of a bare-bones Future, to allow compiling junixsocket-common with retrolambda for Java 1.7.

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the computed result
get
()

Waits if necessary for the computation to complete, and then retrieves its result.

public static <U> AFFuture<U>
supplyAsync(AFSupplier<U> supplier)

Method Detail

getback to summary
public T get() throws InterruptedException, ExecutionException

Waits if necessary for the computation to complete, and then retrieves its result.

Returns:T

the computed result

Exceptions
InterruptedException:
if the current thread was interrupted while waiting
ExecutionException:
if the computation threw an exception
CancellationException:
if the computation was cancelled
supplyAsyncback to summary
public static <U> AFFuture<U> supplyAsync(AFSupplier<U> supplier)