Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (C) 2011 The Guava Authors
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
Provides a backup Future to replace an earlier failed Future. An implementation of this interface can be applied to an input Future with Futures.withFallback(,

<V> the result type of the provided backup Future
Bruno Diniz
public interface FutureFallback<V> {
Returns a Future to be used in place of the Future that failed with the given exception. The exception is provided so that the Fallback implementation can conditionally determine whether to propagate the exception or to attempt to recover.

t the exception that made the future fail. If the future's java.util.concurrent.Future.get() method throws an java.util.concurrent.ExecutionException, then the cause is passed to this method. Any other thrown object is passed unaltered.
New to GrepCode? Check out our FAQ X