Class MasterSlaveServersConfig

    • Constructor Detail

      • MasterSlaveServersConfig

        public MasterSlaveServersConfig()
    • Method Detail

      • setMasterAddress

        public MasterSlaveServersConfig setMasterAddress(String masterAddress)
        Set Redis master server address. Use follow format -- host:port
        Parameters:
        masterAddress - of Redis
        Returns:
        config
      • getMasterAddress

        public String getMasterAddress()
      • addSlaveAddress

        public MasterSlaveServersConfig addSlaveAddress(String... addresses)
        Add Redis slave server address. Use follow format -- host:port
        Parameters:
        addresses - of Redis
        Returns:
        config
      • getSlaveAddresses

        public Set<String> getSlaveAddresses()
      • setSlaveAddresses

        public void setSlaveAddresses(Set<String> readAddresses)
      • setDatabase

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

        public int getDatabase()