object RetryBudget
See RetryBudgets for Java APIs.
- Alphabetic
- By Inheritance
- RetryBudget
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
Empty: RetryBudget
An immutable RetryBudget that never has a balance, and as such, will never allow a retry.
-
val
Infinite: RetryBudget
An immutable RetryBudget that always has a balance of
100
, and as such, will always allow a retry. -
def
apply(ttl: Duration, minRetriesPerSec: Int, percentCanRetry: Double, nowMillis: () ⇒ Long = Stopwatch.systemMillis): RetryBudget
Creates a RetryBudget that allows for about
percentCanRetry
percent of the total requests to be retried.Creates a RetryBudget that allows for about
percentCanRetry
percent of the total requests to be retried.- ttl
Deposits created by
deposit()
expire after approximatelyttl
time has passed. Must be>= 1 second
and<= 60 seconds
.- minRetriesPerSec
the minimum rate of retries allowed in order to accommodate clients that have just started issuing requests as well as clients that do not issue many requests per window. Must be non-negative and if
0
, then no reserve is given.- percentCanRetry
the percentage of calls to
deposit()
that can be retried. This is in addition to any retries allowed for viaminRetriesPerSec
. Must be >= 0 and <= 1000. As an example, if0.1
is used, then for every 10 calls todeposit()
, 1 retry will be allowed. If2.0
is used then everydeposit
allows for 2 retries.- nowMillis
the current time in milliseconds since the epoch. The default of Stopwatch.systemMillis is generally appropriate, though using Stopwatch.timeMillis is useful for well behaved tests so that you can control com.twitter.util.Time.
-
def
apply(): RetryBudget
Creates a default RetryBudget that allows for about 20% of the total requests to be retried on top of a minimum number per second in order to accommodate clients that have just started issuing requests or clients that have a low rate of requests per second.
Creates a default RetryBudget that allows for about 20% of the total requests to be retried on top of a minimum number per second in order to accommodate clients that have just started issuing requests or clients that have a low rate of requests per second.
Deposits created by
deposit()
expire after some amount of time. There is also a minimum reserve of retries allowed per time period in order to accommodate clients that have just started issuing requests as well as clients that do not issue many requests per window. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- 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()
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()