Retry handler set as handler. Use this to set custom retry handler. This type should provide two properties which can be functions or constants (see below): doRetry and delay. It may be a plain object or an instance of a class.

Hierarchy

  • RetryHandler

Properties

Properties

delay: number | ((operation: Operation, numRetries: number, err: NoSQLError) => number)

Determines delay between successive retries in milliseconds. Can be either number, which indicates constant delay in milliseconds, or a function that determines delay based on operation, number of retries so far and the error occurred. See delay.

doRetry: boolean | ((operation: Operation, numRetries: number, err: NoSQLError) => boolean)

Determines whether an operation should be retried. Can be either boolean, which applies to all operations, or a function that determines whether given operation should be retried based on operation, number of retries so far and the error occured. See doRetry.

Generated using TypeDoc