case class CircuitBreakerConfig(enabled: Boolean = core.endpoint.CircuitBreakerConfig.DEFAULT_ENABLED, volumeThreshold: Int = core.endpoint.CircuitBreakerConfig.DEFAULT_VOLUME_THRESHOLD, errorThresholdPercentage: Int = core.endpoint.CircuitBreakerConfig.DEFAULT_ERROR_THRESHOLD_PERCENTAGE, sleepWindow: Duration = core.endpoint.CircuitBreakerConfig.DEFAULT_SLEEP_WINDOW, rollingWindow: Duration = core.endpoint.CircuitBreakerConfig.DEFAULT_ROLLING_WINDOW) extends Product with Serializable
Allows configuring a com.couchbase.client.core.endpoint.CircuitBreaker
.
- Since
1.0.0
- Alphabetic
- By Inheritance
- CircuitBreakerConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CircuitBreakerConfig(enabled: Boolean = core.endpoint.CircuitBreakerConfig.DEFAULT_ENABLED, volumeThreshold: Int = core.endpoint.CircuitBreakerConfig.DEFAULT_VOLUME_THRESHOLD, errorThresholdPercentage: Int = core.endpoint.CircuitBreakerConfig.DEFAULT_ERROR_THRESHOLD_PERCENTAGE, sleepWindow: Duration = core.endpoint.CircuitBreakerConfig.DEFAULT_SLEEP_WINDOW, rollingWindow: Duration = core.endpoint.CircuitBreakerConfig.DEFAULT_ROLLING_WINDOW)
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()
- def enabled(enabled: Boolean): CircuitBreakerConfig
Enables or disables this circuit breaker.
Enables or disables this circuit breaker.
If this property is set to false, then all other properties are not looked at.
- enabled
if true enables it, if false disables it.
- returns
this for chaining purposes.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def errorThresholdPercentage(errorThresholdPercentage: Int): CircuitBreakerConfig
The percentage of operations that need to fail in a window until the circuit is opened.
The percentage of operations that need to fail in a window until the circuit is opened.
The default is 50.
- errorThresholdPercentage
the percent of ops that need to fail.
- returns
this for chaining purposes.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- 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
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def rollingWindow(rollingWindow: Duration): CircuitBreakerConfig
How long the window is in which the number of failed ops are tracked in a rolling fashion.
How long the window is in which the number of failed ops are tracked in a rolling fashion.
The default is 1 minute.
- rollingWindow
the rolling window duration.
- returns
this for chaining purposes.
- def sleepWindow(sleepWindow: Duration): CircuitBreakerConfig
The sleep window that is waited from when the circuit opens to when the canary is tried.
The sleep window that is waited from when the circuit opens to when the canary is tried.
The default is 5 seconds.
- sleepWindow
the sleep window as a duration.
- returns
this for chaining purposes.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def volumeThreshold(volumeThreshold: Int): CircuitBreakerConfig
The volume threshold defines how many operations need to be in the window at least so that the threshold percentage can be meaningfully calculated.
The volume threshold defines how many operations need to be in the window at least so that the threshold percentage can be meaningfully calculated.
The default is 20.
- volumeThreshold
the volume threshold in the interval.
- returns
this for chaining purposes.
- 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])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)