Class

com.avsystem.commons.redis.config

ClusterConfig

Related Doc: package config

Permalink

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
Serializable, Serializable, Product, Equals, AnyRef, Any
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)

    Permalink

    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. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val autoRefreshInterval: FiniteDuration

    Permalink

    interval between routine cluster state refresh operations

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. val fallbackToSingleNode: Boolean

    Permalink

    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.

  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val minRefreshInterval: FiniteDuration

    Permalink

    minimal interval between consecutive cluster state refresh operations.

    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.

  13. val monitoringConnectionConfigs: (NodeAddress) ⇒ ConnectionConfig

    Permalink

    function that returns ConnectionConfig for a monitoring connection used to monitor node with given address.

    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).

  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. val nodeClientCloseDelay: FiniteDuration

    Permalink

    Delay after which RedisNodeClient is closed when it's master leaves cluster state (goes down or becomes a slave).

    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

  16. val nodeConfigs: (NodeAddress) ⇒ NodeConfig

    Permalink

    function that returns NodeConfig given the address of the node.

  17. val nodesToQueryForState: (Int) ⇒ Int

    Permalink

    function that determines how many randomly selected masters should be queried for cluster state during routine state refresh operation.

    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.

  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. val redirectionStrategy: RetryStrategy

    Permalink

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

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. val tryagainStrategy: RetryStrategy

    Permalink

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

  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped