Package org.redisson.config
Class SentinelServersConfig
java.lang.Object
org.redisson.config.BaseConfig<SentinelServersConfig>
org.redisson.config.BaseMasterSlaveServersConfig<SentinelServersConfig>
org.redisson.config.SentinelServersConfig
- Author:
- Nikita Koksharov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddSentinelAddress
(String... addresses) Add Redis Sentinel node address in host:port format.int
int
boolean
boolean
boolean
setCheckSentinelsList
(boolean checkSentinelsList) Enables sentinels list check during Redisson startup.setCheckSlaveStatusWithSyncing
(boolean checkSlaveStatusWithSyncing) check node status from sentinel with 'master-link-status' flagsetDatabase
(int database) Database index used for Redis connection Default is0
setMasterName
(String masterName) Master server name used by Redis Sentinel servers and master change monitoring task.Deprecated.setNatMapper
(NatMapper natMapper) Defines NAT mapper which maps Redis URI object.setScanInterval
(int scanInterval) Sentinel scan interval in millisecondsvoid
setSentinelAddresses
(List<String> sentinelAddresses) setSentinelPassword
(String sentinelPassword) Password required by the Redis Sentinel servers for authentication.setSentinelsDiscovery
(boolean sentinelsDiscovery) Enables sentinels discovery.setSentinelUsername
(String sentinelUsername) Username required by the Redis Sentinel servers for authentication.Methods inherited from class org.redisson.config.BaseMasterSlaveServersConfig
getDnsMonitoringInterval, getFailedSlaveCheckInterval, getFailedSlaveNodeDetector, getFailedSlaveReconnectionInterval, getLoadBalancer, getMasterConnectionMinimumIdleSize, getMasterConnectionPoolSize, getReadMode, getSlaveConnectionMinimumIdleSize, getSlaveConnectionPoolSize, getSubscriptionConnectionMinimumIdleSize, getSubscriptionConnectionPoolSize, getSubscriptionMode, isSlaveNotUsed, setDnsMonitoringInterval, setFailedSlaveCheckInterval, setFailedSlaveNodeDetector, setFailedSlaveReconnectionInterval, setLoadBalancer, setMasterConnectionMinimumIdleSize, setMasterConnectionPoolSize, setReadMode, setSlaveConnectionMinimumIdleSize, setSlaveConnectionPoolSize, setSubscriptionConnectionMinimumIdleSize, setSubscriptionConnectionPoolSize, setSubscriptionMode
Methods inherited from class org.redisson.config.BaseConfig
getClientName, getCommandMapper, getConnectTimeout, getCredentialsResolver, getIdleConnectionTimeout, getNameMapper, getPassword, getPingConnectionInterval, getRetryAttempts, getRetryInterval, getSslCiphers, getSslKeyManagerFactory, getSslKeystore, getSslKeystorePassword, getSslProtocols, getSslProvider, getSslTrustManagerFactory, getSslTruststore, getSslTruststorePassword, getSubscriptionsPerConnection, getSubscriptionTimeout, getTcpKeepAliveCount, getTcpKeepAliveIdle, getTcpKeepAliveInterval, getTcpUserTimeout, getTimeout, getUsername, isKeepAlive, isSslEnableEndpointIdentification, isTcpNoDelay, setClientName, setCommandMapper, setConnectTimeout, setCredentialsResolver, setIdleConnectionTimeout, setKeepAlive, setNameMapper, setPassword, setPingConnectionInterval, setRetryAttempts, setRetryInterval, setSslCiphers, setSslEnableEndpointIdentification, setSslKeyManagerFactory, setSslKeystore, setSslKeystorePassword, setSslProtocols, setSslProvider, setSslTrustManagerFactory, setSslTruststore, setSslTruststorePassword, setSubscriptionsPerConnection, setSubscriptionTimeout, setTcpKeepAliveCount, setTcpKeepAliveIdle, setTcpKeepAliveInterval, setTcpNoDelay, setTcpUserTimeout, setTimeout, setUsername
-
Constructor Details
-
SentinelServersConfig
public SentinelServersConfig()
-
-
Method Details
-
setMasterName
Master server name used by Redis Sentinel servers and master change monitoring task.- Parameters:
masterName
- of Redis- Returns:
- config
-
getMasterName
-
setSentinelUsername
Username required by the Redis Sentinel servers for authentication.- Parameters:
sentinelUsername
- of Redis- Returns:
- config
-
getSentinelUsername
-
setSentinelPassword
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
-
addSentinelAddress
Add Redis Sentinel node address in host:port format. Multiple nodes at once could be added.- Parameters:
addresses
- of Redis- Returns:
- config
-
getSentinelAddresses
-
setSentinelAddresses
-
setDatabase
Database index used for Redis connection Default is0
- Parameters:
database
- number- Returns:
- config
-
getDatabase
public int getDatabase() -
getScanInterval
public int getScanInterval() -
setScanInterval
Sentinel scan interval in millisecondsDefault is
1000
- Parameters:
scanInterval
- in milliseconds- Returns:
- config
-
setNatMap
Deprecated. -
getNatMapper
-
setNatMapper
Defines NAT mapper which maps Redis URI object. Applied to all Redis connections.- Parameters:
natMapper
- - nat mapper object- Returns:
- config
- See Also:
-
isCheckSentinelsList
public boolean isCheckSentinelsList() -
setCheckSentinelsList
Enables sentinels list check during Redisson startup.Default is
true
- Parameters:
checkSentinelsList
- - boolean value- Returns:
- config
-
isCheckSlaveStatusWithSyncing
public boolean isCheckSlaveStatusWithSyncing() -
setCheckSlaveStatusWithSyncing
check node status from sentinel with 'master-link-status' flagDefault is
true
- Parameters:
checkSlaveStatusWithSyncing
- - boolean value- Returns:
- config
-
isSentinelsDiscovery
public boolean isSentinelsDiscovery() -
setSentinelsDiscovery
Enables sentinels discovery.Default is
true
- Parameters:
sentinelsDiscovery
- - boolean value- Returns:
- config
-