library / io.getstream.chat.android.livedata.utils / RetryPolicy

RetryPolicy

interface RetryPolicy

When creating a channel, adding a reaction or sending any temporary error will trigger the retry policy The retry policy interface exposes 2 methods

Functions

retryTimeout

In the case that we want to retry a failed request the retryTimeout method is called to determine the timeout

abstract fun retryTimeout(client: ChatClient, attempt: Int, error: ChatError): Int

shouldRetry

Should Retry evaluates if we should retry the failure

abstract fun shouldRetry(client: ChatClient, attempt: Int, error: ChatError): Boolean

Inheritors

DefaultRetryPolicy

class DefaultRetryPolicy : RetryPolicy