Polling Outcome
Terminal outcome of a polling session.
Use exhaustive when to handle all cases:
when (outcome) { is PollingOutcome.Success -> { /* use outcome.value / } is PollingOutcome.Exhausted -> { / retries ended without success / } is PollingOutcome.Timeout -> { / overall timeout exceeded / } is PollingOutcome.Cancelled -> { / cancelled by user/system */ } }
Inheritors
Types
Link copied to clipboard
data class Exhausted(val last: PollingResult<*>?, val attempts: Int, val elapsedMs: Long) : PollingOutcome<Nothing>
Attempts exhausted or retry predicate returned false on last error.