Default

Properties

Link copied to clipboard
open override val isOneShot: Boolean = false

Only allows mutate to execute once while active (until reset).

Link copied to clipboard
open override val isStrictMode: Boolean = false

Requires revision match as a precondition for executing mutate.

Link copied to clipboard
open override val keepAliveTime: Duration

Duration to remain state as an active.

Link copied to clipboard
open override val logger: LoggerFn? = null

Specifies the logger function.

Link copied to clipboard
open override val onError: (ErrorRecord, MutationModel<*>) -> Unit? = null

This callback function will be called if some mutation encounters an error.

Link copied to clipboard
open override val retryCount: Int = 3

The number of times to retry the operation.

Link copied to clipboard
open override val retryInitialInterval: Duration

The initial interval for retrying the operation.

Link copied to clipboard
open override val retryMaxInterval: Duration

The maximum interval for retrying the operation.

Link copied to clipboard
open override val retryMultiplier: Double = 1.5

The multiplier for the next interval.

Link copied to clipboard
open override val retryRandomizationFactor: Double = 0.5

The randomization factor for the next interval.

Link copied to clipboard
open override val retryRandomizer: Random

The random number generator for the next interval.

Link copied to clipboard
open override val shouldExecuteEffectSynchronously: Boolean = false

Whether the query side effect should be synchronous. If true, side effect will be executed synchronously.

Link copied to clipboard
open override val shouldRetry: (Throwable) -> Boolean

Specifies whether to retry the operation.

Link copied to clipboard
open override val shouldSuppressErrorRelay: (ErrorRecord, MutationModel<*>) -> Boolean? = null

Determines whether to suppress error information when relaying it using soil.query.core.ErrorRelay.

Functions

Link copied to clipboard
fun MutationOptions.copy(isOneShot: Boolean = this.isOneShot, isStrictMode: Boolean = this.isStrictMode, onError: (ErrorRecord, MutationModel<*>) -> Unit? = this.onError, shouldSuppressErrorRelay: (ErrorRecord, MutationModel<*>) -> Boolean? = this.shouldSuppressErrorRelay, shouldExecuteEffectSynchronously: Boolean = this.shouldExecuteEffectSynchronously, keepAliveTime: Duration = this.keepAliveTime, logger: LoggerFn? = this.logger, shouldRetry: (Throwable) -> Boolean = this.shouldRetry, retryCount: Int = this.retryCount, retryInitialInterval: Duration = this.retryInitialInterval, retryMaxInterval: Duration = this.retryMaxInterval, retryMultiplier: Double = this.retryMultiplier, retryRandomizationFactor: Double = this.retryRandomizationFactor, retryRandomizer: Random = this.retryRandomizer): MutationOptions

Copies the current MutationOptions with the specified settings.

Link copied to clipboard

Generates an RetryFn for Exponential Backoff Strategy.