Packages

case class ClusterConfig(nodeConfigs: (NodeAddress) ⇒ NodeConfig = _ => NodeConfig(), monitoringConnectionConfigs: (NodeAddress) ⇒ ConnectionConfig = _ => ConnectionConfig(), autoRefreshInterval: FiniteDuration = 5.seconds, minRefreshInterval: FiniteDuration = 1.seconds, nodesToQueryForState: (Int) ⇒ Int = _ min 5, redirectionStrategy: RetryStrategy = RetryStrategy.times(3), tryagainStrategy: RetryStrategy = ..., nodeClientCloseDelay: FiniteDuration = 1.seconds, fallbackToSingleNode: Boolean = false) extends Product with Serializable

Configuration of a RedisClusterClient

nodeConfigs

function that returns NodeConfig given the address of the node.

monitoringConnectionConfigs

function that returns ConnectionConfig for a monitoring connection used to monitor node with given address. The cluster client keeps single monitoring connection for every cluster master. Monitoring connections are used to refresh Redis Cluster state (current masters and slot mapping).

autoRefreshInterval

interval between routine cluster state refresh operations

minRefreshInterval

minimal interval between consecutive cluster state refresh operations. Normally, cluster state is not refreshed more frequently than specified by autoRefreshInterval but additional refresh operations may be forced when cluster redirections are observed. minRefreshInterval prevents too many refresh operations from being executed in such situations.

nodesToQueryForState

function that determines how many randomly selected masters should be queried for cluster state during routine state refresh operation. The function takes current number of known masters as its argument.

redirectionStrategy

RetryStrategy that controls Redis Cluster redirection handling (MOVED and ASK responses).

tryagainStrategy

RetryStrategy that controls retrying commands which failed with TRYAGAIN error which may be returned for multikey commands during cluster slot migration.

nodeClientCloseDelay

Delay after which RedisNodeClient is closed when it's master leaves cluster state (goes down or becomes a slave). Note that the node client is NOT operational during that delay. Trying to execute commands on it will result in NodeRemovedException

fallbackToSingleNode

if RedisClusterClient has exactly one seed address configured and it points to a non-clustered Redis node then cluster client will not fail initialization but internally create a RedisNodeClient for that node and forward all operations to it.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClusterConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ClusterConfig(nodeConfigs: (NodeAddress) ⇒ NodeConfig = _ => NodeConfig(), monitoringConnectionConfigs: (NodeAddress) ⇒ ConnectionConfig = _ => ConnectionConfig(), autoRefreshInterval: FiniteDuration = 5.seconds, minRefreshInterval: FiniteDuration = 1.seconds, nodesToQueryForState: (Int) ⇒ Int = _ min 5, redirectionStrategy: RetryStrategy = RetryStrategy.times(3), tryagainStrategy: RetryStrategy = ..., nodeClientCloseDelay: FiniteDuration = 1.seconds, fallbackToSingleNode: Boolean = false)

    nodeConfigs

    function that returns NodeConfig given the address of the node.

    monitoringConnectionConfigs

    function that returns ConnectionConfig for a monitoring connection used to monitor node with given address. The cluster client keeps single monitoring connection for every cluster master. Monitoring connections are used to refresh Redis Cluster state (current masters and slot mapping).

    autoRefreshInterval

    interval between routine cluster state refresh operations

    minRefreshInterval

    minimal interval between consecutive cluster state refresh operations. Normally, cluster state is not refreshed more frequently than specified by autoRefreshInterval but additional refresh operations may be forced when cluster redirections are observed. minRefreshInterval prevents too many refresh operations from being executed in such situations.

    nodesToQueryForState

    function that determines how many randomly selected masters should be queried for cluster state during routine state refresh operation. The function takes current number of known masters as its argument.

    redirectionStrategy

    RetryStrategy that controls Redis Cluster redirection handling (MOVED and ASK responses).

    tryagainStrategy

    RetryStrategy that controls retrying commands which failed with TRYAGAIN error which may be returned for multikey commands during cluster slot migration.

    nodeClientCloseDelay

    Delay after which RedisNodeClient is closed when it's master leaves cluster state (goes down or becomes a slave). Note that the node client is NOT operational during that delay. Trying to execute commands on it will result in NodeRemovedException

    fallbackToSingleNode

    if RedisClusterClient has exactly one seed address configured and it points to a non-clustered Redis node then cluster client will not fail initialization but internally create a RedisNodeClient for that node and forward all operations to it.

Value Members

  1. val autoRefreshInterval: FiniteDuration
  2. val fallbackToSingleNode: Boolean
  3. val minRefreshInterval: FiniteDuration
  4. val monitoringConnectionConfigs: (NodeAddress) ⇒ ConnectionConfig
  5. val nodeClientCloseDelay: FiniteDuration
  6. val nodeConfigs: (NodeAddress) ⇒ NodeConfig
  7. val nodesToQueryForState: (Int) ⇒ Int
  8. val redirectionStrategy: RetryStrategy
  9. val tryagainStrategy: RetryStrategy