Package org.redisson.config
Class MasterSlaveServersConfig
- java.lang.Object
-
- org.redisson.config.BaseConfig<T>
-
- org.redisson.config.BaseMasterSlaveServersConfig<MasterSlaveServersConfig>
-
- org.redisson.config.MasterSlaveServersConfig
-
public class MasterSlaveServersConfig extends BaseMasterSlaveServersConfig<MasterSlaveServersConfig>
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description MasterSlaveServersConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MasterSlaveServersConfig
addSlaveAddress(String slaveAddress)
MasterSlaveServersConfig
addSlaveAddress(String... addresses)
Add Redis slave server address.int
getDatabase()
String
getMasterAddress()
Set<String>
getSlaveAddresses()
MasterSlaveServersConfig
setDatabase(int database)
Database index used for Redis connection Default is0
MasterSlaveServersConfig
setMasterAddress(String masterAddress)
Set Redis master server address.void
setSlaveAddresses(Set<String> readAddresses)
-
Methods inherited from class org.redisson.config.BaseMasterSlaveServersConfig
checkSkipSlavesInit, getDnsMonitoringInterval, getFailedSlaveCheckInterval, getFailedSlaveReconnectionInterval, getLoadBalancer, getMasterConnectionMinimumIdleSize, getMasterConnectionPoolSize, getReadMode, getSlaveConnectionMinimumIdleSize, getSlaveConnectionPoolSize, getSubscriptionConnectionMinimumIdleSize, getSubscriptionConnectionPoolSize, getSubscriptionMode, setDnsMonitoringInterval, setFailedSlaveCheckInterval, setFailedSlaveReconnectionInterval, setLoadBalancer, setMasterConnectionMinimumIdleSize, setMasterConnectionPoolSize, setReadMode, setSlaveConnectionMinimumIdleSize, setSlaveConnectionPoolSize, setSubscriptionConnectionMinimumIdleSize, setSubscriptionConnectionPoolSize, setSubscriptionMode
-
Methods inherited from class org.redisson.config.BaseConfig
getClientName, getConnectTimeout, getIdleConnectionTimeout, getNameMapper, getPassword, getPingConnectionInterval, getRetryAttempts, getRetryInterval, getSslKeystore, getSslKeystorePassword, getSslProtocols, getSslProvider, getSslTruststore, getSslTruststorePassword, getSubscriptionsPerConnection, getTimeout, getUsername, isKeepAlive, isSslEnableEndpointIdentification, isTcpNoDelay, setClientName, setConnectTimeout, setIdleConnectionTimeout, setKeepAlive, setNameMapper, setPassword, setPingConnectionInterval, setRetryAttempts, setRetryInterval, setSslEnableEndpointIdentification, setSslKeystore, setSslKeystorePassword, setSslProtocols, setSslProvider, setSslTruststore, setSslTruststorePassword, setSubscriptionsPerConnection, setTcpNoDelay, setTimeout, setUsername
-
-
-
-
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
-
addSlaveAddress
public MasterSlaveServersConfig addSlaveAddress(String slaveAddress)
-
setDatabase
public MasterSlaveServersConfig setDatabase(int database)
Database index used for Redis connection Default is0
- Parameters:
database
- number- Returns:
- config
-
getDatabase
public int getDatabase()
-
-