private static class Futures.ImmediateFailedCheckedFuture<V,X extends java.lang.Exception> extends Futures.ImmediateFuture<V> implements CheckedFuture<V,X>
Constructor and Description |
---|
ImmediateFailedCheckedFuture(X thrown) |
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
private final X extends java.lang.Exception thrown
ImmediateFailedCheckedFuture(X thrown)
public V get() throws java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<V>
get
in class Futures.ImmediateFuture<V>
java.util.concurrent.ExecutionException
public V checkedGet() throws X extends java.lang.Exception
CheckedFuture
Future.get()
that will translate
InterruptedException
, CancellationException
and
ExecutionException
into application-specific exceptions.checkedGet
in interface CheckedFuture<V,X extends java.lang.Exception>
X
- on interruption, cancellation or execution exceptions.X extends java.lang.Exception
public V checkedGet(long timeout, java.util.concurrent.TimeUnit unit) throws X extends java.lang.Exception
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>
X
- on interruption, cancellation or execution exceptions.X extends java.lang.Exception