object CircuitBreaker
- Alphabetic
- By Inheritance
- CircuitBreaker
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait CircuitBreakerCallError[+E] extends AnyRef
- case class CircuitBreakerException[E](error: CircuitBreakerCallError[E]) extends Exception with Product with Serializable
- sealed trait State extends AnyRef
- case class StateChange(from: State, to: State, at: Instant) extends Product with Serializable
- case class WrappedError[E](error: E) extends CircuitBreakerCallError[E] with Product with Serializable
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- 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
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def make[E](trippingStrategy: ZIO[Scope, Nothing, TrippingStrategy], resetPolicy: Schedule[Any, Any, Any] = Retry.Schedules.exponentialBackoff(1.second, 1.minute), isFailure: PartialFunction[E, Boolean] = isFailureAny[E], metricLabels: Option[Set[MetricLabel]] = None): ZIO[Scope, Nothing, CircuitBreaker[E]]
Create a CircuitBreaker with the given tripping strategy
Create a CircuitBreaker with the given tripping strategy
- trippingStrategy
Determines under which conditions the CircuitBraker trips
- resetPolicy
Reset schedule after too many failures. Typically an exponential backoff strategy is used.
- isFailure
Only failures that match according to
isFailure
are treated as failures by the circuit breaker. Other failures are passed on, circumventing the circuit breaker's failure counter.- metricLabels
Set of labels to annotate metrics with, to distinguish this circuit breaker from others in the same application. No metrics are recorded if None is passed.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- 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])
- def withMaxFailures[E](maxFailures: Int, resetPolicy: Schedule[Any, Any, Any] = Retry.Schedules.exponentialBackoff(1.second, 1.minute), isFailure: PartialFunction[E, Boolean] = isFailureAny[E], metricLabels: Option[Set[MetricLabel]] = None): ZIO[Scope, Nothing, CircuitBreaker[E]]
Create a CircuitBreaker that fails when a number of successive failures (no pun intended) has been counted
Create a CircuitBreaker that fails when a number of successive failures (no pun intended) has been counted
- maxFailures
Maximum number of failures before tripping the circuit breaker
- resetPolicy
Reset schedule after too many failures. Typically an exponential backoff strategy is used.
- isFailure
Only failures that match according to
isFailure
are treated as failures by the circuit breaker. Other failures are passed on, circumventing the circuit breaker's failure counter.- metricLabels
Set of labels to annotate metrics with, to distinguish this circuit breaker from others in the same application. No metrics are recorded if None is passed.
- returns
The CircuitBreaker as a managed resource
- case object CircuitBreakerOpen extends CircuitBreakerCallError[Nothing] with Product with Serializable
- object State
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)