public abstract static class AbstractFuture.TrustedFuture<V> extends AbstractFuture<V>
get() calls exactly the implementation of AbstractFuture.get(long, java.util.concurrent.TimeUnit).AbstractFuture.TrustedFuture<V>| Constructor and Description |
|---|
TrustedFuture() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(java.lang.Runnable listener,
java.util.concurrent.Executor executor) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
cancel, interruptTask, set, setException, setFuture, wasInterrupted@Nullable public final V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
AbstractFutureThe default AbstractFuture implementation throws InterruptedException if the current thread is interrupted before or during
the call, even if the value is already available.
get in interface java.util.concurrent.Future<V>get in class AbstractFuture<V>java.lang.InterruptedException - if the current thread was interrupted before
or during the call (optional but recommended).java.util.concurrent.ExecutionException@Nullable public final V get(long timeout, @Nonnull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
AbstractFutureThe default AbstractFuture implementation throws InterruptedException if the current thread is interrupted before or during
the call, even if the value is already available.
get in interface java.util.concurrent.Future<V>get in class AbstractFuture<V>java.lang.InterruptedException - if the current thread was interrupted before
or during the call (optional but recommended).java.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic final boolean isDone()
isDone in interface java.util.concurrent.Future<V>isDone in class AbstractFuture<V>public final boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<V>isCancelled in class AbstractFuture<V>public final void addListener(@Nonnull
java.lang.Runnable listener,
@Nonnull
java.util.concurrent.Executor executor)
AbstractFutureaddListener in interface ListenableFuture<V>addListener in class AbstractFuture<V>