MutationOptions

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

Creates a new MutationOptions with the specified settings.

Parameters

isOneShot

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

isStrictMode

Requires revision match as a precondition for executing mutate.

onError

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

shouldSuppressErrorRelay

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

shouldExecuteEffectSynchronously

Whether the query side effect should be synchronous.

keepAliveTime

The duration to keep the actor alive after the last message is processed.

logger

The logger function to use for logging.

shouldRetry

The predicate function to determine whether to retry on a given exception.

retryCount

The maximum number of retry attempts.

retryInitialInterval

The initial interval for exponential backoff.

retryMaxInterval

The maximum interval for exponential backoff.

retryMultiplier

The multiplier for exponential backoff.

retryRandomizationFactor

The randomization factor for exponential backoff.

retryRandomizer

The random number generator for exponential backoff.