Circuit Breaker
constructor(name: String, failureThreshold: Int = DEFAULT_FAILURE_THRESHOLD, windowMs: Long = DEFAULT_WINDOW_MS, cooldownMs: Long = DEFAULT_COOLDOWN_MS, clock: () -> Long = System::currentTimeMillis)(source)
Parameters
name
Human-readable label used in log messages
failure Threshold
Number of failures within windowMs that trip the breaker
window Ms
Sliding time window for counting failures (milliseconds)
cooldown Ms
How long the breaker stays OPEN before transitioning to HALF_OPEN