object CircuitBreaker
Companion object providing factory methods for Circuit Breaker which runs callbacks in caller's thread
- Source
- CircuitBreaker.scala
- Alphabetic
- By Inheritance
- CircuitBreaker
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- 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
- 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
- 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
- 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