Interface FallbackConfig<T>

Type Parameters:
T -
All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
FallbackConfig.BuilderBase.FallbackConfigImpl

public interface FallbackConfig<T> extends Prototype.Api
Fallback configuration.
See Also:
  • Method Details

    • builder

      static <T> FallbackConfig.Builder<T> builder()
      Create a new fluent API builder to customize configuration.
      Type Parameters:
      T -
      Returns:
      a new builder
    • builder

      static <T> FallbackConfig.Builder<T> builder(FallbackConfig<T> instance)
      Create a new fluent API builder from an existing instance.
      Type Parameters:
      T -
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static <T> FallbackConfig<T> create()
      Create a new instance with default values.
      Type Parameters:
      T -
      Returns:
      a new instance
    • fallback

      Function<Throwable,? extends T> fallback()
      A fallback function.
      Returns:
      fallback function to obtain alternative result
    • skipOn

      Set<Class<? extends Throwable>> skipOn()
      These throwables will not be considered retriable, all other will.
      Returns:
      throwable classes to skip retries
      See Also:
    • applyOn

      Set<Class<? extends Throwable>> applyOn()
      These throwables will be considered retriable.
      Returns:
      throwable classes to trigger retries
      See Also: