V - The result type returned by this Future's get methodX - The type of the Exception thrown by the Future's checkedGet methodCheckedFuture<V,X>, ListenableFuture<V>, java.util.concurrent.Future<V>ForwardingCheckedFuture.SimpleForwardingCheckedFuture@Beta @GwtIncompatible public abstract class ForwardingCheckedFuture<V,X extends java.lang.Exception> extends ForwardingListenableFuture<V> implements CheckedFuture<V,X>
Most subclasses can simply extend ForwardingCheckedFuture.SimpleForwardingCheckedFuture.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ForwardingCheckedFuture.SimpleForwardingCheckedFuture<V,X extends java.lang.Exception> |
A simplified version of
ForwardingCheckedFuture where subclasses can pass in an already
constructed CheckedFuture as the delegate. |
ForwardingFuture.SimpleForwardingFuture<V>ForwardingListenableFuture.SimpleForwardingListenableFuture<V>| Constructor | Description |
|---|---|
ForwardingCheckedFuture() |
| Modifier and Type | Method | 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. |
protected abstract CheckedFuture<V,X> |
delegate() |
Returns the backing delegate instance that methods are forwarded to.
|
cancel, get, get, isCancelled, isDoneaddListenertoStringaddListenerpublic V checkedGet() throws X extends java.lang.Exception
CheckedFutureFuture.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.Exceptionpublic V checkedGet(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException, X extends java.lang.Exception
CheckedFutureFuture.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>java.util.concurrent.TimeoutException - if retrieving the result timed out.X - on interruption, cancellation or execution exceptions.X extends java.lang.Exceptionprotected abstract CheckedFuture<V,X> delegate()
ForwardingObjectForwardingSet.delegate(). Concrete subclasses override this method to supply
the instance being decorated.delegate in class ForwardingListenableFuture<V>