private static class Futures.ImmediateSuccessfulCheckedFuture<V,X extends java.lang.Exception> extends Futures.ImmediateFuture<V> implements CheckedFuture<V,X>
Constructor and Description |
---|
ImmediateSuccessfulCheckedFuture(V value) |
Modifier and Type | Method and Description |
---|---|
V |
checkedGet()
Exception checking version of
Future.get() that will translate
InterruptedException , CancellationException and
ExecutionException into application-specific exceptions. |
V |
checkedGet(long timeout,
java.util.concurrent.TimeUnit unit)
Exception checking version of
Future.get(long, TimeUnit) that will
translate InterruptedException , CancellationException and
ExecutionException into application-specific exceptions. |
V |
get() |
addListener, cancel, get, isCancelled, isDone
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener
@Nullable private final V value
ImmediateSuccessfulCheckedFuture(@Nullable V value)
public V get()
get
in interface java.util.concurrent.Future<V>
get
in class Futures.ImmediateFuture<V>
public V checkedGet()
CheckedFuture
Future.get()
that will translate
InterruptedException
, CancellationException
and
ExecutionException
into application-specific exceptions.checkedGet
in interface CheckedFuture<V,X extends java.lang.Exception>
public V checkedGet(long timeout, java.util.concurrent.TimeUnit unit)
CheckedFuture
Future.get(long, TimeUnit)
that will
translate InterruptedException
, CancellationException
and
ExecutionException
into application-specific exceptions. On
timeout this method throws a normal TimeoutException
.checkedGet
in interface CheckedFuture<V,X extends java.lang.Exception>