Class FallbackConfig.BuilderBase<T,BUILDER extends FallbackConfig.BuilderBase<T,BUILDER,PROTOTYPE>,PROTOTYPE extends FallbackConfig<T>>

java.lang.Object
io.helidon.faulttolerance.FallbackConfig.BuilderBase<T,BUILDER,PROTOTYPE>
Type Parameters:
T -
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
FallbackConfig.Builder
Enclosing interface:
FallbackConfig<T>

public abstract static class FallbackConfig.BuilderBase<T,BUILDER extends FallbackConfig.BuilderBase<T,BUILDER,PROTOTYPE>,PROTOTYPE extends FallbackConfig<T>> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for FallbackConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(FallbackConfig<T> prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(FallbackConfig.BuilderBase<T,?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • fallback

      public BUILDER fallback(Function<Throwable,? extends T> fallback)
      A fallback function.
      Parameters:
      fallback - fallback function to obtain alternative result
      Returns:
      updated builder instance
      See Also:
    • skipOn

      public BUILDER skipOn(Set<Class<? extends Throwable>> skipOn)
      These throwables will not be considered retriable, all other will.
      Parameters:
      skipOn - throwable classes to skip retries
      Returns:
      updated builder instance
      See Also:
    • addSkipOn

      public BUILDER addSkipOn(Set<Class<? extends Throwable>> skipOn)
      These throwables will not be considered retriable, all other will.
      Parameters:
      skipOn - throwable classes to skip retries
      Returns:
      updated builder instance
      See Also:
    • addSkipOn

      public BUILDER addSkipOn(Class<? extends Throwable> skipOn)
      These throwables will not be considered retriable, all other will.
      Parameters:
      skipOn - throwable classes to skip retries
      Returns:
      updated builder instance
      See Also:
    • applyOn

      public BUILDER applyOn(Set<Class<? extends Throwable>> applyOn)
      These throwables will be considered retriable.
      Parameters:
      applyOn - throwable classes to trigger retries
      Returns:
      updated builder instance
      See Also:
    • addApplyOn

      public BUILDER addApplyOn(Set<Class<? extends Throwable>> applyOn)
      These throwables will be considered retriable.
      Parameters:
      applyOn - throwable classes to trigger retries
      Returns:
      updated builder instance
      See Also:
    • addApplyOn

      public BUILDER addApplyOn(Class<? extends Throwable> applyOn)
      These throwables will be considered retriable.
      Parameters:
      applyOn - throwable classes to trigger retries
      Returns:
      updated builder instance
      See Also:
    • fallback

      public Optional<Function<Throwable,? extends T>> fallback()
      A fallback function.
      Returns:
      the fallback
    • skipOn

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

      public Set<Class<? extends Throwable>> applyOn()
      These throwables will be considered retriable.
      Returns:
      the apply on
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.