Packages

object CircuitBreaker

Companion object providing factory methods for Circuit Breaker which runs callbacks in caller's thread

Source
CircuitBreaker.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CircuitBreaker
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def apply(id: String)(implicit system: ClassicActorSystemProvider): CircuitBreaker

    Create or find a CircuitBreaker in registry.

    Create or find a CircuitBreaker in registry.

    id

    Circuit Breaker identifier

    system

    ActorSystem that is storing this CircuitBreaker

  2. def apply(scheduler: Scheduler, maxFailures: Int, callTimeout: FiniteDuration, resetTimeout: FiniteDuration): CircuitBreaker

    Create a new CircuitBreaker.

    Create a new CircuitBreaker.

    Callbacks run in caller's thread when using withSyncCircuitBreaker, and in same ExecutionContext as the passed in Future when using withCircuitBreaker. To use another ExecutionContext for the callbacks you can specify the executor in the constructor.

    scheduler

    Reference to Akka scheduler

    maxFailures

    Maximum number of failures before opening the circuit

    callTimeout

    scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure

    resetTimeout

    scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit

  3. def create(scheduler: Scheduler, maxFailures: Int, callTimeout: Duration, resetTimeout: Duration): CircuitBreaker

    Java API: Create a new CircuitBreaker.

    Java API: Create a new CircuitBreaker.

    Callbacks run in caller's thread when using withSyncCircuitBreaker, and in same ExecutionContext as the passed in Future when using withCircuitBreaker. To use another ExecutionContext for the callbacks you can specify the executor in the constructor.

    scheduler

    Reference to Akka scheduler

    maxFailures

    Maximum number of failures before opening the circuit

    callTimeout

    java.time.Duration of time after which to consider a call a failure

    resetTimeout

    java.time.Duration of time after which to attempt to close the circuit

  4. def lookup(id: String, system: ClassicActorSystemProvider): CircuitBreaker

    Java API: Create or find a CircuitBreaker in registry.

    Java API: Create or find a CircuitBreaker in registry.

    id

    Circuit Breaker identifier

    system

    ActorSystem that is storing this CircuitBreaker