Example usage for Java com.google.common.util.concurrent Futures fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addCallback(ListenableFuture Registers separate success and failure callbacks to be run when the Future 's computation is java.util.concurrent.Future#isDone() complete or, if the computation is already complete, immediately. |
void | addCallback(final ListenableFuture Registers separate success and failure callbacks to be run when the Future 's computation is java.util.concurrent.Future#isDone() complete or, if the computation is already complete, immediately. |
ListenableFuture
| allAsList(ListenableFuture extends V>... futures) Creates a new ListenableFuture whose value is a list containing the values of all its input futures, if all succeed. |
ListenableFuture
| allAsList( Iterable extends ListenableFuture extends V>> futures) Creates a new ListenableFuture whose value is a list containing the values of all its input futures, if all succeed. |
ListenableFuture | catching(ListenableFuture extends V> input, Class Returns a Future whose result is taken from the given primary input or, if the primary input fails with the given exceptionType , from the result provided by the fallback . |
ListenableFuture | catching(ListenableFuture extends V> input, Class Returns a Future whose result is taken from the given primary input or, if the primary input fails with the given exceptionType , from the result provided by the fallback . |
ListenableFuture | catchingAsync(ListenableFuture extends V> input, Class Returns a Future whose result is taken from the given primary input or, if the primary input fails with the given exceptionType , from the result provided by the fallback . |
ListenableFuture | catchingAsync(ListenableFuture extends V> input, Class Returns a Future whose result is taken from the given primary input or, if the primary input fails with the given exceptionType , from the result provided by the fallback . |
ListenableFuture | dereference( ListenableFuture extends ListenableFuture extends V>> nested) Returns a new ListenableFuture whose result is the product of calling get() on the Future nested within the given Future , effectively chaining the futures one after the other. |
V | get(Future Returns the result of Future#get(long,TimeUnit) , converting most exceptions to a new instance of the given checked exception type. |
V | get(Future Returns the result of Future#get() , converting most exceptions to a new instance of the given checked exception type. |
V | getChecked(Future Returns the result of Future#get(long,TimeUnit) , converting most exceptions to a new instance of the given checked exception type. |
V | getChecked(Future Returns the result of Future#get() , converting most exceptions to a new instance of the given checked exception type. |
V | getUnchecked(Future Returns the result of calling Future#get() uninterruptibly on a task known not to throw a checked exception. |
ListenableFuture | immediateCancelledFuture() Creates a ListenableFuture which is cancelled immediately upon construction, so that isCancelled() always returns true . |
CheckedFuture | immediateCheckedFuture(@Nullable V value) Returns a CheckedFuture which has its value set immediately upon construction. |
CheckedFuture | immediateFailedCheckedFuture(X exception) Returns a CheckedFuture which has an exception set immediately upon construction. |
ListenableFuture | immediateFailedFuture(Throwable throwable) Returns a ListenableFuture which has an exception set immediately upon construction. |
ListenableFuture | immediateFuture(@Nullable V value) Creates a ListenableFuture which has its value set immediately upon construction. |
ImmutableList | inCompletionOrder( Iterable extends ListenableFuture extends T>> futures) Returns a list of delegate futures that correspond to the futures received in the order that they complete. |
Future | lazyTransform(final Future input, final Function super I, ? extends O> function) Like #transform(ListenableFuture,Function) except that the transformation function is invoked on each call to Future#get() get() on the returned future. |
CheckedFuture | makeChecked(ListenableFuture Creates a CheckedFuture out of a normal ListenableFuture and a Function that maps from Exception instances into the appropriate checked type. |
ListenableFuture | nonCancellationPropagating(ListenableFuture Creates a new ListenableFuture whose result is set from the supplied future when it completes. |
ListenableFuture
| successfulAsList(ListenableFuture extends V>... futures) Creates a new ListenableFuture whose value is a list containing the values of all its successful input futures. |
ListenableFuture
| successfulAsList( Iterable extends ListenableFuture extends V>> futures) Creates a new ListenableFuture whose value is a list containing the values of all its successful input futures. |
ListenableFuture | transform(ListenableFuture input, AsyncFunction super I, ? extends O> function) Returns a new ListenableFuture whose result is asynchronously derived from the result of the given Future . |
ListenableFuture | transform(ListenableFuture input, Function super I, ? extends O> function) Returns a new ListenableFuture whose result is the product of applying the given Function to the result of the given Future . |
ListenableFuture | transform(ListenableFuture input, AsyncFunction super I, ? extends O> function, Executor executor) Returns a new ListenableFuture whose result is asynchronously derived from the result of the given Future . |
ListenableFuture | transform(ListenableFuture input, Function super I, ? extends O> function, Executor executor) Returns a new ListenableFuture whose result is the product of applying the given Function to the result of the given Future . |
ListenableFuture | transformAsync(ListenableFuture input, AsyncFunction super I, ? extends O> function, Executor executor) Returns a new ListenableFuture whose result is asynchronously derived from the result of the given Future . |
ListenableFuture | transformAsync(ListenableFuture input, AsyncFunction super I, ? extends O> function) Returns a new ListenableFuture whose result is asynchronously derived from the result of the given Future . |
ListenableFuture | withFallback(ListenableFuture extends V> input, FutureFallback extends V> fallback) Returns a Future whose result is taken from the given primary input or, if the primary input fails, from the Future provided by the fallback . |
ListenableFuture | withFallback(ListenableFuture extends V> input, FutureFallback extends V> fallback, Executor executor) Returns a Future whose result is taken from the given primary input or, if the primary input fails, from the Future provided by the fallback . |
ListenableFuture | withTimeout(ListenableFuture Returns a future that delegates to another but will finish early (via a TimeoutException wrapped in an ExecutionException ) if the specified duration expires. |