Example usage for com.google.common.util.concurrent Futures withFallback

List of usage examples for com.google.common.util.concurrent Futures withFallback

Introduction

In this page you can find the example usage for com.google.common.util.concurrent Futures withFallback.

Prototype

@Deprecated
@CheckReturnValue
public static <V> ListenableFuture<V> withFallback(ListenableFuture<? extends V> input,
        FutureFallback<? extends V> fallback, Executor executor) 

Source Link

Document

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 .

Usage

From source file:org.robotninjas.concurrent.FluentDecorator.java

@Override
public FluentFuture<V> withFallback(Executor executor, FutureFallback<V> fallback) {
    return new FluentDecorator<>(Futures.withFallback(this, fallback, executor), this.executor);
}

From source file:org.robotninjas.concurrent.FluentFutureTask.java

@Override
public FluentFuture<V> withFallback(Executor executor, FutureFallback<V> fallback) {
    return new FluentDecorator<>(Futures.withFallback(this, fallback, executor));
}