Class ReplicatedServersConfig


  • public class ReplicatedServersConfig
    extends BaseMasterSlaveServersConfig<ReplicatedServersConfig>
    Configuration for an Azure Redis Cache or AWS ElastiCache servers. A replication group is composed of a single master endpoint and multiple read slaves.
    Author:
    Steve Ungerer, Nikita Koksharov
    • Constructor Detail

      • ReplicatedServersConfig

        public ReplicatedServersConfig()
    • Method Detail

      • addNodeAddress

        public ReplicatedServersConfig addNodeAddress​(String... addresses)
        Add Redis cluster node address. Use follow format -- host:port
        Parameters:
        addresses - in host:port format
        Returns:
        config
      • getNodeAddresses

        public List<String> getNodeAddresses()
      • setNodeAddresses

        public void setNodeAddresses​(List<String> nodeAddresses)
      • getScanInterval

        public int getScanInterval()
      • setScanInterval

        public ReplicatedServersConfig setScanInterval​(int scanInterval)
        Replication group scan interval in milliseconds

        Default is 1000

        Parameters:
        scanInterval - in milliseconds
        Returns:
        config
      • setDatabase

        public ReplicatedServersConfig setDatabase​(int database)
        Database index used for Redis connection.

        Default is 0

        Parameters:
        database - number
        Returns:
        config
      • getDatabase

        public int getDatabase()