Class ApiFutureToListenableFuture<V> (2.6.0)

Stay organized with collections Save and categorize content based on your preferences.
public class ApiFutureToListenableFuture<V> implements ListenableFuture<V>

INTERNAL USE ONLY. Adapter from ApiFuture to Guava ListenableFuture.

Inheritance

java.lang.Object > ApiFutureToListenableFuture<V>

Implements

com.google.common.util.concurrent.ListenableFuture<V>

Type Parameter

NameDescription
V

Constructors

ApiFutureToListenableFuture(ApiFuture<V> apiFuture)

public ApiFutureToListenableFuture(ApiFuture<V> apiFuture)
Parameter
NameDescription
apiFutureApiFuture<V>

Methods

addListener(Runnable listener, Executor executor)

public void addListener(Runnable listener, Executor executor)
Parameters
NameDescription
listenerRunnable
executorExecutor

cancel(boolean b)

public boolean cancel(boolean b)
Parameter
NameDescription
bboolean
Returns
TypeDescription
boolean

get()

public V get()
Returns
TypeDescription
V
Exceptions
TypeDescription
InterruptedException
ExecutionException

get(long l, TimeUnit timeUnit)

public V get(long l, TimeUnit timeUnit)
Parameters
NameDescription
llong
timeUnitTimeUnit
Returns
TypeDescription
V
Exceptions
TypeDescription
InterruptedException
ExecutionException
TimeoutException

isCancelled()

public boolean isCancelled()
Returns
TypeDescription
boolean

isDone()

public boolean isDone()
Returns
TypeDescription
boolean