Package com.juul.tuulbox.coroutines.delay

Types

DelayStrategy
Link copied to clipboard
common
interface DelayStrategy
Interface, using the strategy pattern, for an implementer to delay for periods of time.
Dynamic
Link copied to clipboard
common
class Dynamic<T> : DelayStrategy
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).
ExponentialBackoff
Link copied to clipboard
common
class ExponentialBackoff(baseTimeMillis: Long, multiplier: Float, minimumDelayMillis: Long, maximumDelayMillis: Long) : DelayStrategy
DelayStrategy with an exponentially increasing delay, calculated with getExponentialBackoffMillis.
FixedDelay
Link copied to clipboard
common
class FixedDelay(delayMillis: Long) : DelayStrategy
DelayStrategy that, when await is called, will delay for a fixed amount of time, specified by delayMillis.