Class BaseConfig<T extends BaseConfig<T>>

    • Method Detail

      • setSubscriptionsPerConnection

        public T setSubscriptionsPerConnection(int subscriptionsPerConnection)
        Subscriptions per Redis connection limit

        Default is 5

        Parameters:
        subscriptionsPerConnection - amount
        Returns:
        config
      • getSubscriptionsPerConnection

        public int getSubscriptionsPerConnection()
      • setPassword

        public T setPassword(String password)
        Password for Redis authentication. Should be null if not needed.

        Default is null

        Parameters:
        password - for connection
        Returns:
        config
      • getPassword

        public String getPassword()
      • setUsername

        public T setUsername(String username)
        Username for Redis authentication. Should be null if not needed

        Default is null

        Requires Redis 6.0+

        Parameters:
        username - for connection
        Returns:
        config
      • getUsername

        public String getUsername()
      • setRetryAttempts

        public T setRetryAttempts(int retryAttempts)
        Error will be thrown if Redis command can't be sent to Redis server after retryAttempts. But if it sent successfully then timeout will be started.

        Default is 3 attempts

        Parameters:
        retryAttempts - - retry attempts
        Returns:
        config
        See Also:
        timeout
      • getRetryAttempts

        public int getRetryAttempts()
      • setRetryInterval

        public T setRetryInterval(int retryInterval)
        Defines time interval for another one attempt send Redis command if it hasn't been sent already.

        Default is 1500 milliseconds

        Parameters:
        retryInterval - - time in milliseconds
        Returns:
        config
      • getRetryInterval

        public int getRetryInterval()
      • setTimeout

        public T setTimeout(int timeout)
        Redis server response timeout. Starts to countdown when Redis command has been successfully sent.

        Default is 3000 milliseconds

        Parameters:
        timeout - in milliseconds
        Returns:
        config
      • getTimeout

        public int getTimeout()
      • setClientName

        public T setClientName(String clientName)
        Setup connection name during connection init via CLIENT SETNAME command

        Default is null

        Parameters:
        clientName - - name of client
        Returns:
        config
      • getClientName

        public String getClientName()
      • setConnectTimeout

        public T setConnectTimeout(int connectTimeout)
        Timeout during connecting to any Redis server.

        Default is 10000 milliseconds.

        Parameters:
        connectTimeout - - timeout in milliseconds
        Returns:
        config
      • getConnectTimeout

        public int getConnectTimeout()
      • setIdleConnectionTimeout

        public T setIdleConnectionTimeout(int idleConnectionTimeout)
        If pooled connection not used for a timeout time and current connections amount bigger than minimum idle connections pool size, then it will closed and removed from pool.

        Default is 10000 milliseconds.

        Parameters:
        idleConnectionTimeout - - timeout in milliseconds
        Returns:
        config
      • getIdleConnectionTimeout

        public int getIdleConnectionTimeout()
      • isSslEnableEndpointIdentification

        public boolean isSslEnableEndpointIdentification()
      • setSslEnableEndpointIdentification

        public T setSslEnableEndpointIdentification(boolean sslEnableEndpointIdentification)
        Enables SSL endpoint identification.

        Default is true

        Parameters:
        sslEnableEndpointIdentification - - boolean value
        Returns:
        config
      • setSslProvider

        public T setSslProvider(SslProvider sslProvider)
        Defines SSL provider used to handle SSL connections.

        Default is JDK

        Parameters:
        sslProvider - - ssl provider
        Returns:
        config
      • getSslTruststore

        public URL getSslTruststore()
      • setSslTruststore

        public T setSslTruststore(URL sslTruststore)
        Defines path to SSL truststore

        Default is null

        Parameters:
        sslTruststore - - path
        Returns:
        config
      • getSslTruststorePassword

        public String getSslTruststorePassword()
      • setSslTruststorePassword

        public T setSslTruststorePassword(String sslTruststorePassword)
        Defines password for SSL truststore

        Default is null

        Parameters:
        sslTruststorePassword - - password
        Returns:
        config
      • getSslKeystore

        public URL getSslKeystore()
      • setSslKeystore

        public T setSslKeystore(URL sslKeystore)
        Defines path to SSL keystore

        Default is null

        Parameters:
        sslKeystore - - path to keystore
        Returns:
        config
      • getSslKeystorePassword

        public String getSslKeystorePassword()
      • setSslKeystorePassword

        public T setSslKeystorePassword(String sslKeystorePassword)
        Defines password for SSL keystore

        Default is null

        Parameters:
        sslKeystorePassword - - password
        Returns:
        config
      • getSslProtocols

        public String[] getSslProtocols()
      • setSslProtocols

        public T setSslProtocols(String[] sslProtocols)
        Defines SSL protocols. Example values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1

        Default is null

        Parameters:
        sslProtocols - - protocols
        Returns:
        config
      • getPingConnectionInterval

        public int getPingConnectionInterval()
      • setPingConnectionInterval

        public T setPingConnectionInterval(int pingConnectionInterval)
        Defines PING command sending interval per connection to Redis. 0 means disable.

        Default is 30000

        Parameters:
        pingConnectionInterval - - time in milliseconds
        Returns:
        config
      • isKeepAlive

        public boolean isKeepAlive()
      • setKeepAlive

        public T setKeepAlive(boolean keepAlive)
        Enables TCP keepAlive for connection

        Default is false

        Parameters:
        keepAlive - - boolean value
        Returns:
        config
      • isTcpNoDelay

        public boolean isTcpNoDelay()
      • setTcpNoDelay

        public T setTcpNoDelay(boolean tcpNoDelay)
        Enables TCP noDelay for connection

        Default is true

        Parameters:
        tcpNoDelay - - boolean value
        Returns:
        config
      • getNameMapper

        public NameMapper getNameMapper()
      • setNameMapper

        public T setNameMapper(NameMapper nameMapper)
        Defines Name mapper which maps Redisson object name. Applied to all Redisson objects.
        Parameters:
        nameMapper - - name mapper object
        Returns:
        config