Class AbstractApiFuture<V> (2.38.0)

public abstract class AbstractApiFuture<V> implements ApiFuture<V>

Abstract implementation of ApiFuture that mirrors AbstractFuture in Guava.

Inheritance

java.lang.Object > AbstractApiFuture<V>

Implements

com.google.api.core.ApiFuture<V>

Type Parameter

Name Description
V

Constructors

AbstractApiFuture()

public AbstractApiFuture()

Methods

addListener(Runnable listener, Executor executor)

public void addListener(Runnable listener, Executor executor)
Parameters
Name Description
listener Runnable
executor Executor

cancel(boolean mayInterruptIfRunning)

public boolean cancel(boolean mayInterruptIfRunning)
Parameter
Name Description
mayInterruptIfRunning boolean
Returns
Type Description
boolean

get()

public V get()
Returns
Type Description
V
Exceptions
Type Description
InterruptedException
ExecutionException

get(long timeout, TimeUnit unit)

public V get(long timeout, TimeUnit unit)
Parameters
Name Description
timeout long
unit TimeUnit
Returns
Type Description
V
Exceptions
Type Description
InterruptedException
ExecutionException
TimeoutException

interruptTask()

protected void interruptTask()

isCancelled()

public boolean isCancelled()
Returns
Type Description
boolean

isDone()

public boolean isDone()
Returns
Type Description
boolean

set(V value)

protected boolean set(V value)
Parameter
Name Description
value V
Returns
Type Description
boolean

setException(Throwable throwable)

protected boolean setException(Throwable throwable)
Parameter
Name Description
throwable Throwable
Returns
Type Description
boolean