Class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig<T>>

    • Constructor Detail

      • BaseMasterSlaveServersConfig

        public BaseMasterSlaveServersConfig()
    • Method Detail

      • setSlaveConnectionPoolSize

        public T setSlaveConnectionPoolSize(int slaveConnectionPoolSize)
        Redis 'slave' servers connection pool size for each slave node.

        Default is 64

        Parameters:
        slaveConnectionPoolSize - - size of pool
        Returns:
        config
        See Also:
        setSlaveConnectionMinimumIdleSize(int)
      • getSlaveConnectionPoolSize

        public int getSlaveConnectionPoolSize()
      • setFailedSlaveReconnectionInterval

        public T setFailedSlaveReconnectionInterval(int failedSlavesReconnectionTimeout)
        Interval of Redis Slave reconnection attempt when it was excluded from internal list of available servers.

        On every such timeout event Redisson tries to connect to disconnected Redis server.

        Default is 3000

        Parameters:
        failedSlavesReconnectionTimeout - - retry timeout in milliseconds
        Returns:
        config
      • getFailedSlaveReconnectionInterval

        public int getFailedSlaveReconnectionInterval()
      • setFailedSlaveCheckInterval

        public T setFailedSlaveCheckInterval(int slaveFailsInterval)
        Redis Slave node failing to execute commands is excluded from the internal list of available nodes when the time interval from the moment of first Redis command execution failure on this server reaches slaveFailsInterval value.

        Default is 180000

        Parameters:
        slaveFailsInterval - - time interval in milliseconds
        Returns:
        config
      • getFailedSlaveCheckInterval

        public int getFailedSlaveCheckInterval()
      • setMasterConnectionPoolSize

        public T setMasterConnectionPoolSize(int masterConnectionPoolSize)
        Redis 'master' server connection pool size.

        Default is 64

        Parameters:
        masterConnectionPoolSize - - pool size
        Returns:
        config
        See Also:
        setMasterConnectionMinimumIdleSize(int)
      • getMasterConnectionPoolSize

        public int getMasterConnectionPoolSize()
      • setSubscriptionConnectionPoolSize

        public T setSubscriptionConnectionPoolSize(int subscriptionConnectionPoolSize)
        Maximum connection pool size for subscription (pub/sub) channels

        Default is 50

        Parameters:
        subscriptionConnectionPoolSize - - pool size
        Returns:
        config
        See Also:
        setSubscriptionConnectionMinimumIdleSize(int)
      • getSubscriptionConnectionPoolSize

        public int getSubscriptionConnectionPoolSize()
      • setSlaveConnectionMinimumIdleSize

        public T setSlaveConnectionMinimumIdleSize(int slaveConnectionMinimumIdleSize)
        Minimum idle connection pool size for subscription (pub/sub) channels

        Default is 24

        Parameters:
        slaveConnectionMinimumIdleSize - - pool size
        Returns:
        config
        See Also:
        setSlaveConnectionPoolSize(int)
      • getSlaveConnectionMinimumIdleSize

        public int getSlaveConnectionMinimumIdleSize()
      • setMasterConnectionMinimumIdleSize

        public T setMasterConnectionMinimumIdleSize(int masterConnectionMinimumIdleSize)
        Redis 'master' node minimum idle connection amount for each slave node

        Default is 24

        Parameters:
        masterConnectionMinimumIdleSize - - pool size
        Returns:
        config
        See Also:
        setMasterConnectionPoolSize(int)
      • getMasterConnectionMinimumIdleSize

        public int getMasterConnectionMinimumIdleSize()
      • setSubscriptionConnectionMinimumIdleSize

        public T setSubscriptionConnectionMinimumIdleSize(int subscriptionConnectionMinimumIdleSize)
        Redis 'slave' node minimum idle subscription (pub/sub) connection amount for each slave node.

        Default is 1

        Parameters:
        subscriptionConnectionMinimumIdleSize - - pool size
        Returns:
        config
        See Also:
        setSubscriptionConnectionPoolSize(int)
      • getSubscriptionConnectionMinimumIdleSize

        public int getSubscriptionConnectionMinimumIdleSize()
      • setReadMode

        public T setReadMode(ReadMode readMode)
        Set node type used for read operation.

        Default is SLAVE

        Parameters:
        readMode - param
        Returns:
        config
      • getReadMode

        public ReadMode getReadMode()
      • checkSkipSlavesInit

        public boolean checkSkipSlavesInit()
      • setSubscriptionMode

        public T setSubscriptionMode(SubscriptionMode subscriptionMode)
        Set node type used for subscription operation.

        Default is MASTER

        Parameters:
        subscriptionMode - param
        Returns:
        config
      • setDnsMonitoringInterval

        public T setDnsMonitoringInterval(long dnsMonitoringInterval)
        Interval in milliseconds to check the endpoint's DNS

        Applications must ensure the JVM DNS cache TTL is low enough to support this.

        Set -1 to disable.

        Default is 5000.

        Parameters:
        dnsMonitoringInterval - time
        Returns:
        config
      • getDnsMonitoringInterval

        public long getDnsMonitoringInterval()