Interface CircuitBreakerConfig

All Superinterfaces:
Prototype.Api, Prototype.Factory<CircuitBreaker>
All Known Implementing Classes:

public interface CircuitBreakerConfig extends Prototype.Api
Interface generated from definition. Please add javadoc to the definition interface.
See Also:
  • Field Details

  • Method Details

    • builder

      static CircuitBreakerConfig.Builder builder()
      Create a new fluent API builder to customize configuration.
      a new builder
    • builder

      Create a new fluent API builder from an existing instance.
      instance - an existing instance used as a base for the builder
      a builder based on an instance
    • create

      static CircuitBreakerConfig create(Config config)
      Create a new instance from configuration.
      config - used to configure the new instance
      a new instance configured from configuration
    • create

      static CircuitBreakerConfig create()
      Create a new instance with default values.
      a new instance
    • name

      Optional<String> name()
    • delay

      Duration delay()
      How long to wait before transitioning from open to half-open state.
    • errorRatio

      int errorRatio()
      How many failures out of 100 will trigger the circuit to open. This is adapted to the volume() used to handle the window of requests.

      If errorRatio is 40, and volume is 10, 4 failed requests will open the circuit. Default is 60.

      percent of failure that trigger the circuit to open
      See Also:
    • volume

      int volume()
      Rolling window size used to calculate ratio of failed requests. Default is 10.
      how big a window is used to calculate error errorRatio
      See Also:
    • successThreshold

      int successThreshold()
      How many successful calls will close a half-open circuit. Nevertheless, the first failed call will open the circuit again. Default is 1.
      number of calls
    • executor

      Executor service to schedule future tasks.
      executor to use
    • skipOn

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

      Set<Class<? extends Throwable>> applyOn()
      These throwables will be considered failures.
      throwable classes to be considered a failure
      See Also: