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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoRefreshInterval: FiniteDuration
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val fallbackToSingleNode: Boolean
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val minRefreshInterval: FiniteDuration
- val monitoringConnectionConfigs: (NodeAddress) ⇒ ConnectionConfig
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nodeClientCloseDelay: FiniteDuration
- val nodeConfigs: (NodeAddress) ⇒ NodeConfig
- val nodesToQueryForState: (Int) ⇒ Int
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val redirectionStrategy: RetryStrategy
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tryagainStrategy: RetryStrategy
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )