Class ImmediateFuture.ImmediateSuccessfulCheckedFuture<V,X extends java.lang.Exception>
- java.lang.Object
-
- com.google.common.util.concurrent.GwtFluentFutureCatchingSpecialization<V>
-
- com.google.common.util.concurrent.FluentFuture<V>
-
- com.google.common.util.concurrent.ImmediateFuture<V>
-
- com.google.common.util.concurrent.ImmediateFuture.ImmediateSuccessfulCheckedFuture<V,X>
-
- All Implemented Interfaces:
CheckedFuture<V,X>
,ListenableFuture<V>
,java.util.concurrent.Future<V>
- Enclosing class:
- ImmediateFuture<V>
@GwtIncompatible static class ImmediateFuture.ImmediateSuccessfulCheckedFuture<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 ImmediateSuccessfulCheckedFuture(V value)
-
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()
java.lang.String
toString()
-
Methods inherited from class com.google.common.util.concurrent.ImmediateFuture
addListener, cancel, get, isCancelled, isDone
-
Methods inherited from class com.google.common.util.concurrent.FluentFuture
addCallback, catching, catchingAsync, from, transform, transformAsync, withTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.common.util.concurrent.ListenableFuture
addListener
-
-
-
-
Field Detail
-
value
private final V value
-
-
Constructor Detail
-
ImmediateSuccessfulCheckedFuture
ImmediateSuccessfulCheckedFuture(V value)
-
-
Method Detail
-
get
public V get()
- Specified by:
get
in interfacejava.util.concurrent.Future<V>
- Specified by:
get
in classImmediateFuture<V>
-
checkedGet
public V checkedGet()
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.
-
checkedGet
public V checkedGet(long timeout, java.util.concurrent.TimeUnit unit)
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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-