QueryOptions

QueryOptions providing settings related to the internal behavior of an Query.

Inheritors

Types

Link copied to clipboard

Properties

Link copied to clipboard
abstract val errorEquals: (Throwable, Throwable) -> Boolean?

Determines whether two errors are equal.

Link copied to clipboard
abstract val gcTime: Duration

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

Link copied to clipboard
abstract val keepAliveTime: Duration

Duration to remain state as an active.

Link copied to clipboard
abstract val logger: LoggerFn?

Specifies the logger function.

Link copied to clipboard
abstract val onError: (ErrorRecord, QueryModel<*>) -> Unit?

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

Link copied to clipboard

Determines whether query processing needs to be paused based on error.

Link copied to clipboard

Maximum window time on prefetch processing.

Link copied to clipboard
abstract val retryCount: Int

The number of times to retry the operation.

Link copied to clipboard

The initial interval for retrying the operation.

Link copied to clipboard

The maximum interval for retrying the operation.

Link copied to clipboard
abstract val retryMultiplier: Double

The multiplier for the next interval.

Link copied to clipboard

The randomization factor for the next interval.

Link copied to clipboard
abstract val retryRandomizer: Random

The random number generator for the next interval.

Link copied to clipboard

Automatically revalidate active Query when the window is refocused.

Link copied to clipboard

Automatically revalidate active Query when the network reconnects.

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

Specifies whether to retry the operation.

Link copied to clipboard

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

Link copied to clipboard
abstract val staleTime: Duration

The duration after which the returned value of the fetch function block is considered stale.

Functions

Link copied to clipboard
fun QueryOptions.copy(staleTime: Duration = this.staleTime, gcTime: Duration = this.gcTime, prefetchWindowTime: Duration = this.prefetchWindowTime, errorEquals: (Throwable, Throwable) -> Boolean? = this.errorEquals, pauseDurationAfter: (Throwable) -> Duration?? = this.pauseDurationAfter, revalidateOnReconnect: Boolean = this.revalidateOnReconnect, revalidateOnFocus: Boolean = this.revalidateOnFocus, onError: (ErrorRecord, QueryModel<*>) -> Unit? = this.onError, shouldSuppressErrorRelay: (ErrorRecord, QueryModel<*>) -> Boolean? = this.shouldSuppressErrorRelay, 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): QueryOptions

Copies the current QueryOptions with the specified settings.

Link copied to clipboard

Generates an RetryFn for Exponential Backoff Strategy.