FailoverStrategy

reactivemongo.api.FailoverStrategy
See theFailoverStrategy companion object
final class FailoverStrategy

A failover strategy for sending requests. The default uses 10 retries: 125ms, 250ms, 375ms, 500ms, 625ms, 750ms, 875ms, 1s, 1125ms, 1250ms

import scala.concurrent.duration._

reactivemongo.api.FailoverStrategy(
 initialDelay = 150.milliseconds,
 retries = 20,
 delayFactor = { `try` => `try` * 1.5D })

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def copy(initialDelay: FiniteDuration, retries: Int, delayFactor: Int => Double): FailoverStrategy

The function that takes the current iteration, and returns a factor to be applied to the initialDelay (default: FailoverStrategy.defaultFactor; See FailoverStrategy.FactorFun)

The function that takes the current iteration, and returns a factor to be applied to the initialDelay (default: FailoverStrategy.defaultFactor; See FailoverStrategy.FactorFun)

Attributes

The initial delay between the first failed attempt and the next one

The initial delay between the first failed attempt and the next one

Attributes

The number of retries to do before giving up

The number of retries to do before giving up

Attributes

Concrete fields

lazy override val toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.