Package-level declarations

Types

Link copied to clipboard

A client-side rate limiter backed by a token bucket. This limiter adaptively updates the refill rate of the bucket based on the number of successful transactions vs throttling errors. This limiter applies a smoothing function in an attempt to converge on the ideal transaction rate feasible for downstream systems.

Link copied to clipboard
interface DelayProvider

An object that can be used to delay between iterations of code.

Link copied to clipboard

A DelayProvider that implements exponentially increasing delays and jitter (i.e., randomization of delay amount). This delayer calculates a maximum delay time from the initial delay amount, the scale factor, and the attempt number. It then randomly reduces that time down to something less based on the jitter configuration.

Link copied to clipboard

A RetryTokenBucket that doesn't actually track tokens, effectively simulating "infinite" token capacity. All operations immediately succeed and no blocking occurs.

Link copied to clipboard
interface RateLimiter

A client-side utility that can limit the rate of transactions. This limiter is usually backed by some set of permits which refill over time. This kind of rate limiting is often used in conjunction with a retry algorithm, especially when it may be desirable to delay the initial attempt of a transaction (instead of just delaying subsequent attempts).

Link copied to clipboard

Indicates that the token bucket has exhausted its capacity and was configured to throw exceptions (vs delay).

Link copied to clipboard
interface RetryToken

A token from a RetryTokenBucket. This token grants the holder the right to attempt a try/retry of a block of code. The token is effectively "borrowed" from the token bucket and must be returned when the retry attempt is completed, either by calling notifySuccess or scheduleRetry.

Link copied to clipboard

A rate-limiting token bucket for use in a client-throttled retry strategy.

Link copied to clipboard

The standard implementation of a RetryTokenBucket.