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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def convertJavaFailureFnToScala[T](javaFn: BiFunction[Optional[T], Optional[Throwable], Boolean]): (Try[T]) => Boolean
- Attributes
- protected
- 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- 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.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated