Class AbstractCatchingFuture.CatchingFuture<V,​X extends java.lang.Throwable>

    • Constructor Detail

      • CatchingFuture

        CatchingFuture​(ListenableFuture<? extends V> input,
                       java.lang.Class<X> exceptionType,
                       Function<? super X,​? extends V> fallback)
    • Method Detail

      • doFallback

        @Nullable
        V doFallback​(Function<? super X,​? extends V> fallback,
                     X cause)
              throws java.lang.Exception
        Description copied from class: AbstractCatchingFuture
        Template method for subtypes to actually run the fallback.
        Specified by:
        doFallback in class AbstractCatchingFuture<V,​X extends java.lang.Throwable,​Function<? super X extends java.lang.Throwable,​? extends V>,​V>
        Throws:
        java.lang.Exception