Class ImmediateFuture.ImmediateFailedCheckedFuture<V,X extends java.lang.Exception>
- java.lang.Object
-
- com.google.common.util.concurrent.ImmediateFuture<V>
-
- com.google.common.util.concurrent.ImmediateFuture.ImmediateFailedCheckedFuture<V,X>
-
- All Implemented Interfaces:
CheckedFuture<V,X>
,ListenableFuture<V>
,java.util.concurrent.Future<V>
- Enclosing class:
- ImmediateFuture<V>
@GwtIncompatible static class ImmediateFuture.ImmediateFailedCheckedFuture<V,X extends java.lang.Exception> extends ImmediateFuture<V> implements CheckedFuture<V,X>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.util.concurrent.ImmediateFuture
ImmediateFuture.ImmediateCancelledFuture<V>, ImmediateFuture.ImmediateFailedCheckedFuture<V,X extends java.lang.Exception>, ImmediateFuture.ImmediateFailedFuture<V>, ImmediateFuture.ImmediateSuccessfulCheckedFuture<V,X extends java.lang.Exception>, ImmediateFuture.ImmediateSuccessfulFuture<V>
-
-
Constructor Summary
Constructors Constructor Description ImmediateFailedCheckedFuture(X thrown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
checkedGet()
Exception checking version ofFuture.get()
that will translateInterruptedException
,CancellationException
andExecutionException
into application-specific exceptions.V
checkedGet(long timeout, java.util.concurrent.TimeUnit unit)
Exception checking version ofFuture.get(long, TimeUnit)
that will translateInterruptedException
,CancellationException
andExecutionException
into application-specific exceptions.V
get()
-
Methods inherited from class com.google.common.util.concurrent.ImmediateFuture
addListener, cancel, get, isCancelled, isDone
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.common.util.concurrent.ListenableFuture
addListener
-
-
-
-
Field Detail
-
thrown
private final X extends java.lang.Exception thrown
-
-
Constructor Detail
-
ImmediateFailedCheckedFuture
ImmediateFailedCheckedFuture(X thrown)
-
-
Method Detail
-
get
public V get() throws java.util.concurrent.ExecutionException
- Specified by:
get
in interfacejava.util.concurrent.Future<V>
- Specified by:
get
in classImmediateFuture<V>
- Throws:
java.util.concurrent.ExecutionException
-
checkedGet
public V checkedGet() throws X extends java.lang.Exception
Description copied from interface:CheckedFuture
Exception checking version ofFuture.get()
that will translateInterruptedException
,CancellationException
andExecutionException
into application-specific exceptions.- Specified by:
checkedGet
in interfaceCheckedFuture<V,X extends java.lang.Exception>
- Returns:
- the result of executing the future.
- Throws:
X
- on interruption, cancellation or execution exceptions.X extends java.lang.Exception
-
checkedGet
public V checkedGet(long timeout, java.util.concurrent.TimeUnit unit) throws X extends java.lang.Exception
Description copied from interface:CheckedFuture
Exception checking version ofFuture.get(long, TimeUnit)
that will translateInterruptedException
,CancellationException
andExecutionException
into application-specific exceptions. On timeout this method throws a normalTimeoutException
.- Specified by:
checkedGet
in interfaceCheckedFuture<V,X extends java.lang.Exception>
- Returns:
- the result of executing the future.
- Throws:
X
- on interruption, cancellation or execution exceptions.X extends java.lang.Exception
-
-