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. All

Value Members

  1. 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

  2. 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

Deprecated Value Members

  1. def create(scheduler: Scheduler, maxFailures: Int, callTimeout: FiniteDuration, resetTimeout: FiniteDuration): 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

    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

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.12) Use the overloaded one which accepts java.time.Duration instead.