CircuitBreaker

object CircuitBreaker extends LogSupport
Companion:
class
trait Product
trait Mirror
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any

Type members

Classlikes

case object CLOSED extends CircuitBreakerState
case object HALF_OPEN extends CircuitBreakerState
case object OPEN extends CircuitBreakerState

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

Create a CircuitBreaker that will be open if the number of consecutive failures exceeds the given threshold.

Create a CircuitBreaker that will be open if the number of consecutive failures exceeds the given threshold.

def withFailureRate(failureRate: Double, timeWindowMillis: Int): CircuitBreaker

Create a CircuitBreaker that will be open if the failure rate in a time window exceeds the given threshold. The failure rate will be decayed exponentially as time goes.

Create a CircuitBreaker that will be open if the failure rate in a time window exceeds the given threshold. The failure rate will be decayed exponentially as time goes.

def withFailureThreshold(numFailures: Int, numExecutions: Int): CircuitBreaker

Create a CircuitBreaker that will be open after observing numFailures out of numExecutions.

Create a CircuitBreaker that will be open after observing numFailures out of numExecutions.

Inherited methods

inline protected def debug(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def debug(inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def error(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def error(inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def info(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def info(inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def logAt(inline logLevel: LogLevel, inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def trace(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def trace(inline message: Any): Unit
Inherited from:
LoggingMethods
inline protected def warn(inline message: Any, inline cause: Throwable): Unit
Inherited from:
LoggingMethods
inline protected def warn(inline message: Any): Unit
Inherited from:
LoggingMethods