Package

failurewall

circuitbreaker

Permalink

package circuitbreaker

Visibility
  1. Public
  2. All

Type Members

  1. final class AkkaCircuitBreakerFailurewall[A] extends Failurewall[A, A]

    Permalink

    A circuit breaker with Failurewall's interface implemented by Akka's CircuitBreaker.

    A circuit breaker with Failurewall's interface implemented by Akka's CircuitBreaker. Calls wrapped in AkkaCircuitBreakerFailurewall are protected by circuit breaker mechanisms. A circuit breaker prevents a failure form cascading any other failures.

    A circuit breaker is a state machine that has a following state.

    - CLOSED - OPEN - HALF-OPEN

    The CLOSED state is the ordinary state. In this state, calls are executed and failure statistics are recorded. When failure count exceeds the threshold, the circuit breaker switches into the OPEN state.

    The OPEN state is the state under problems. In this state, call never executes the body and returns an error immediately, so-called fail-fast. The OPEN state prevents applications from accessing resources under problems. After the configured timeout, the circuit breaker switches into the HALF-OPEN state.

    The HALF-OPEN state is the challenge phase. In this state, the first call executes the body in order to test that the problem is fixed. The other calls never execute bodies and return errors immediately. If the first call succeeds, the circuit breaker switches to CLOSED state. If the first call fails, the circuit breaker switches to OPEN state.

  2. sealed abstract class CircuitBreakerFeedback extends AnyRef

    Permalink

    Whether a circuit breaker should increment the error counter or not.

Value Members

  1. object AkkaCircuitBreakerFailurewall

    Permalink
  2. object Available extends CircuitBreakerFeedback with Product with Serializable

    Permalink

    A circuit breaker should not increment its own error counter.

    A circuit breaker should not increment its own error counter.

    - the call is successful - the operation is failed due to a business logic error such as a validation error or a 404 error

  3. object Unavailable extends CircuitBreakerFeedback with Product with Serializable

    Permalink

    A circuit breaker should increment its own error counter.

    A circuit breaker should increment its own error counter.

    - the remote service or resource crashes - timeout happens

Ungrouped