Interface CircuitBreaker

All Superinterfaces:

public interface CircuitBreaker extends FtHandler
CircuitBreaker protects a potentially failing endpoint from overloading and the application from spending resources on those endpoints.

In case too many errors are detected, the circuit opens and all new requests fail with a CircuitBreakerOpenException for a period of time. After this period, attempts are made to check if the service is up again - if so, the circuit closes and requests can process as usual again.

  • Method Details

    • builder

      static CircuitBreaker.Builder builder()
      Builder to customize configuration of the breaker.
      a new builder
    • state

      Current breaker state. As the state may change within nanoseconds, this is for information only.
      current breaker state
    • state

      void state(CircuitBreaker.State newState)
      Set state of this circuit breaker. Note that all usual processes to re-close or open the circuit are in progress. So a subsequent call to state() may yield a different state than configured here
      newState - state to configure