RetryPolicy

sealed class RetryPolicy

The RetryPolicy is used to determine if and when a network request can be retried.

See also

Inheritors

Types

Link copied to clipboard

DoNotRetry signifies that this request cannot be safely retried.

Link copied to clipboard
class RetryAfterDelay(val interval: Long) : RetryPolicy

RetryAfterDelay signifies that this request can safely be retried, but only after a given time interval, provided in milliseconds.

Link copied to clipboard
class RetryAfterEvent<T>(val event: Observable<T>) : RetryPolicy

RetryAfterEvent signifies that there is an event that can be used to trigger retrying the network request.

Functions

Link copied to clipboard
abstract fun shouldRetry(): Boolean

This method is used to determine whether or not the request should be retried