Package-level declarations

Types

Link copied to clipboard
interface DelayStrategy

Interface, using the strategy pattern, for an implementer to delay for periods of time.

Link copied to clipboard

Dynamic DelayStrategy, allowing for switching between multiple other DelayStrategies utilizing a trigger (to provide an input) and a selector function (to determine a resulting DelayStrategy from said input).

Link copied to clipboard
class ExponentialBackoff(baseTimeMillis: Long = DEFAULT_BASE_TIME_MILLIS, multiplier: Float = DEFAULT_MULTIPLIER, minimumDelayMillis: Long = DEFAULT_MINIMUM_DELAY, maximumDelayMillis: Long = DEFAULT_MAXIMUM_DELAY) : DelayStrategy

DelayStrategy with an exponentially increasing delay, calculated with getExponentialBackoffMillis.

Link copied to clipboard
class FixedDelay(delayMillis: Long) : DelayStrategy

DelayStrategy that, when await is called, will delay for a fixed amount of time, specified by delayMillis.