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
andASK
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.
- Alphabetic
- By Inheritance
- ClusterConfig
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
andASK
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
- val autoRefreshInterval: FiniteDuration
- val fallbackToSingleNode: Boolean
- val minRefreshInterval: FiniteDuration
- val monitoringConnectionConfigs: (NodeAddress) ⇒ ConnectionConfig
- val nodeClientCloseDelay: FiniteDuration
- val nodeConfigs: (NodeAddress) ⇒ NodeConfig
- val nodesToQueryForState: (Int) ⇒ Int
- val redirectionStrategy: RetryStrategy
- val tryagainStrategy: RetryStrategy