object FailureAccrualPolicy
- Alphabetic
- By Inheritance
- FailureAccrualPolicy
- 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
- val DefaultConsecutiveFailures: Int
- val DefaultMinimumRequestThreshold: Int
- val DefaultSuccessRateThreshold: Double
- val DefaultSuccessRateWindow: Duration
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def consecutiveFailures(numFailures: Int, markDeadFor: Backoff): FailureAccrualPolicy
A policy based on a maximum number of consecutive failures.
A policy based on a maximum number of consecutive failures. If
numFailures
occur consecutively,checkFailures()
will return a Some(Duration) to mark an endpoint dead for.- numFailures
number of consecutive failures
- markDeadFor
a policy encoded Backoff to calculate the next duration returned from
markDeadOnFailure()
- val constantBackoff: Backoff
- Attributes
- protected[this]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @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
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val showable: Showable[FailureAccrualPolicy]
- def successRate(requiredSuccessRate: Double, window: Int, markDeadFor: Backoff): FailureAccrualPolicy
Returns a policy based on an exponentially-weighted moving average success rate over a window of requests.
Returns a policy based on an exponentially-weighted moving average success rate over a window of requests. A moving average is used so the success rate calculation is biased towards more recent requests; for an endpoint with low traffic, the window will span a longer time period and early successes and failures may not accurately reflect the current health.
If the computed weighted success rate is less than the required success rate,
markDeadOnFailure()
will return Some(Duration).- requiredSuccessRate
successRate that must be met
- window
window over which the success rate is tracked.
window
requests must occur formarkDeadOnFailure()
to ever return Some(Duration)- markDeadFor
a policy encoded Backoff to calculate the next duration returned from
markDeadOnFailure()
- See also
com.twitter.finagle.util.Ema for how the success rate is computed
- def successRateWithinDuration(requiredSuccessRate: Double, window: Duration, markDeadFor: Backoff): FailureAccrualPolicy
Returns a policy based on an exponentially-weighted moving average success rate over a time window.
Returns a policy based on an exponentially-weighted moving average success rate over a time window. A moving average is used so the success rate calculation is biased towards more recent requests.
If the computed weighted success rate is less than the required success rate,
markDeadOnFailure()
will return Some(Duration).- requiredSuccessRate
successRate that must be met
- window
window over which the success rate is tracked.
markDeadOnFailure()
will return None, until we get requests for a duration of at leastwindow
.- markDeadFor
a policy encoded Backoff to calculate the next duration returned from
markDeadOnFailure()
- See also
com.twitter.finagle.util.Ema for how the success rate is computed
- def successRateWithinDuration(requiredSuccessRate: Double, window: Duration, markDeadFor: Backoff, minRequestThreshold: Int): FailureAccrualPolicy
Returns a policy based on an exponentially-weighted moving average success rate over a time window.
Returns a policy based on an exponentially-weighted moving average success rate over a time window. A moving average is used so the success rate calculation is biased towards more recent requests.
If the computed weighted success rate is less than the required success rate,
markDeadOnFailure()
will return Some(Duration).- requiredSuccessRate
successRate that must be met
- window
duration over which the success rate is tracked.
markDeadOnFailure()
will return None, until we get at leastminRequestThreshold
requests within awindow
duration.- markDeadFor
a policy encoded Backoff to calculate the next duration returned from
markDeadOnFailure()
- minRequestThreshold
minimum number of requests in the past
window
formarkDeadOnFailure()
to return a duration
- See also
com.twitter.finagle.util.Ema for how the success rate is computed
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()