SubscriptionOptions

fun SubscriptionOptions(gcTime: Duration = SubscriptionOptions.gcTime, subscribeOnMount: Boolean = SubscriptionOptions.subscribeOnMount, onError: (ErrorRecord, SubscriptionModel<*>) -> Unit? = SubscriptionOptions.onError, shouldSuppressErrorRelay: (ErrorRecord, SubscriptionModel<*>) -> Boolean? = SubscriptionOptions.shouldSuppressErrorRelay, keepAliveTime: Duration = SubscriptionOptions.keepAliveTime, logger: LoggerFn? = SubscriptionOptions.logger, shouldRetry: (Throwable) -> Boolean = SubscriptionOptions.shouldRetry, retryCount: Int = SubscriptionOptions.retryCount, retryInitialInterval: Duration = SubscriptionOptions.retryInitialInterval, retryMaxInterval: Duration = SubscriptionOptions.retryMaxInterval, retryMultiplier: Double = SubscriptionOptions.retryMultiplier, retryRandomizationFactor: Double = SubscriptionOptions.retryRandomizationFactor, retryRandomizer: Random = SubscriptionOptions.retryRandomizer): SubscriptionOptions

Creates a new SubscriptionOptions with the specified settings.

Parameters

gcTime

The period during which the Key's return value, if not referenced anywhere, is temporarily cached in memory.

subscribeOnMount

Determines whether to subscribe automatically to the subscription when mounted.

onError

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

shouldSuppressErrorRelay

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

keepAliveTime

The duration to keep the actor alive after the last command is executed.

logger

The logger function.

shouldRetry

Determines whether to retry the command when an error occurs.

retryCount

The number of times to retry the command.

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 randomizer for exponential backoff.