public class SentinelServersConfig extends BaseMasterSlaveServersConfig<SentinelServersConfig>
Constructor and Description |
---|
SentinelServersConfig() |
Modifier and Type | Method and Description |
---|---|
SentinelServersConfig |
addSentinelAddress(String... addresses)
Add Redis Sentinel node address in host:port format.
|
int |
getDatabase() |
String |
getMasterName() |
NatMapper |
getNatMapper() |
int |
getScanInterval() |
List<String> |
getSentinelAddresses() |
String |
getSentinelPassword() |
boolean |
isCheckSentinelsList() |
boolean |
isCheckSlaveStatusWithSyncing() |
SentinelServersConfig |
setCheckSentinelsList(boolean checkSentinelsList)
Enables sentinels list check during Redisson startup.
|
SentinelServersConfig |
setCheckSlaveStatusWithSyncing(boolean checkSlaveStatusWithSyncing)
check node status from sentinel with 'master-link-status' flag
Default is
true |
SentinelServersConfig |
setDatabase(int database)
Database index used for Redis connection
Default is
0 |
SentinelServersConfig |
setMasterName(String masterName)
Master server name used by Redis Sentinel servers and master change monitoring task.
|
SentinelServersConfig |
setNatMap(Map<String,String> natMap)
Deprecated.
|
SentinelServersConfig |
setNatMapper(NatMapper natMapper)
Defines NAT mapper which maps Redis URI object.
|
SentinelServersConfig |
setScanInterval(int scanInterval)
Sentinel scan interval in milliseconds
Default is
1000 |
SentinelServersConfig |
setSentinelPassword(String sentinelPassword)
Password required by the Redis Sentinel servers for authentication.
|
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
getClientName, getConnectTimeout, getIdleConnectionTimeout, getPassword, getPingConnectionInterval, getRetryAttempts, getRetryInterval, getSslKeystore, getSslKeystorePassword, getSslProvider, getSslTruststore, getSslTruststorePassword, getSubscriptionsPerConnection, getTimeout, getUsername, isKeepAlive, isSslEnableEndpointIdentification, isTcpNoDelay, setClientName, setConnectTimeout, setIdleConnectionTimeout, setKeepAlive, setPassword, setPingConnectionInterval, setRetryAttempts, setRetryInterval, setSslEnableEndpointIdentification, setSslKeystore, setSslKeystorePassword, setSslProvider, setSslTruststore, setSslTruststorePassword, setSubscriptionsPerConnection, setTcpNoDelay, setTimeout, setUsername
public SentinelServersConfig setMasterName(String masterName)
masterName
- of Redispublic String getMasterName()
public SentinelServersConfig setSentinelPassword(String sentinelPassword)
sentinelPassword
- of Redispublic String getSentinelPassword()
public SentinelServersConfig addSentinelAddress(String... addresses)
addresses
- of Redispublic SentinelServersConfig setDatabase(int database)
0
database
- numberpublic int getDatabase()
public int getScanInterval()
public SentinelServersConfig setScanInterval(int scanInterval)
Default is 1000
scanInterval
- in milliseconds@Deprecated public SentinelServersConfig setNatMap(Map<String,String> natMap)
public NatMapper getNatMapper()
public SentinelServersConfig setNatMapper(NatMapper natMapper)
natMapper
- - nat mapper objectHostNatMapper
,
HostPortNatMapper
public boolean isCheckSentinelsList()
public SentinelServersConfig setCheckSentinelsList(boolean checkSentinelsList)
Default is true
checkSentinelsList
- - boolean valuepublic boolean isCheckSlaveStatusWithSyncing()
public SentinelServersConfig setCheckSlaveStatusWithSyncing(boolean checkSlaveStatusWithSyncing)
Default is true
checkSlaveStatusWithSyncing
- - boolean valueCopyright © 2014–2021 Redisson. All rights reserved.