Class SentinelServersConfig

    • Constructor Detail

      • SentinelServersConfig

        public SentinelServersConfig()
    • Method Detail

      • setMasterName

        public SentinelServersConfig setMasterName(String masterName)
        Master server name used by Redis Sentinel servers and master change monitoring task.
        Parameters:
        masterName - of Redis
        Returns:
        config
      • getMasterName

        public String getMasterName()
      • setSentinelPassword

        public SentinelServersConfig setSentinelPassword(String sentinelPassword)
        Password required by the Redis Sentinel servers for authentication. Used only if sentinel password differs from master and slave.
        Parameters:
        sentinelPassword - of Redis
        Returns:
        config
      • getSentinelPassword

        public String getSentinelPassword()
      • addSentinelAddress

        public SentinelServersConfig addSentinelAddress(String... addresses)
        Add Redis Sentinel node address in host:port format. Multiple nodes at once could be added.
        Parameters:
        addresses - of Redis
        Returns:
        config
      • getSentinelAddresses

        public List<String> getSentinelAddresses()
      • setSentinelAddresses

        public void setSentinelAddresses(List<String> sentinelAddresses)
      • setDatabase

        public SentinelServersConfig setDatabase(int database)
        Database index used for Redis connection Default is 0
        Parameters:
        database - number
        Returns:
        config
      • getDatabase

        public int getDatabase()
      • getScanInterval

        public int getScanInterval()
      • setScanInterval

        public SentinelServersConfig setScanInterval(int scanInterval)
        Sentinel scan interval in milliseconds

        Default is 1000

        Parameters:
        scanInterval - in milliseconds
        Returns:
        config
      • getNatMapper

        public NatMapper getNatMapper()
      • isCheckSentinelsList

        public boolean isCheckSentinelsList()
      • setCheckSentinelsList

        public SentinelServersConfig setCheckSentinelsList(boolean checkSentinelsList)
        Enables sentinels list check during Redisson startup.

        Default is true

        Parameters:
        checkSentinelsList - - boolean value
        Returns:
        config
      • isCheckSlaveStatusWithSyncing

        public boolean isCheckSlaveStatusWithSyncing()
      • setCheckSlaveStatusWithSyncing

        public SentinelServersConfig setCheckSlaveStatusWithSyncing(boolean checkSlaveStatusWithSyncing)
        check node status from sentinel with 'master-link-status' flag

        Default is true

        Parameters:
        checkSlaveStatusWithSyncing - - boolean value
        Returns:
        config