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() |
boolean |
isCheckSentinelsList() |
SentinelServersConfig |
setCheckSentinelsList(boolean checkSentinelsList)
Enables sentinels list check during Redisson startup.
|
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 |
checkSkipSlavesInit, getDnsMonitoringInterval, getFailedSlaveCheckInterval, getFailedSlaveReconnectionInterval, getLoadBalancer, getMasterConnectionMinimumIdleSize, getMasterConnectionPoolSize, getReadMode, getSlaveConnectionMinimumIdleSize, getSlaveConnectionPoolSize, getSubscriptionConnectionMinimumIdleSize, getSubscriptionConnectionPoolSize, getSubscriptionMode, setDnsMonitoringInterval, setFailedSlaveCheckInterval, setFailedSlaveReconnectionInterval, setLoadBalancer, setMasterConnectionMinimumIdleSize, setMasterConnectionPoolSize, setReadMode, setSlaveConnectionMinimumIdleSize, setSlaveConnectionPoolSize, setSubscriptionConnectionMinimumIdleSize, setSubscriptionConnectionPoolSize, setSubscriptionModegetClientName, 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, setUsernamepublic SentinelServersConfig setMasterName(String masterName)
masterName - of Redispublic String getMasterName()
public SentinelServersConfig addSentinelAddress(String... addresses)
addresses - of Redispublic SentinelServersConfig setDatabase(int database)
0database - 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,
HostPortNatMapperpublic boolean isCheckSentinelsList()
public SentinelServersConfig setCheckSentinelsList(boolean checkSentinelsList)
Default is true
checkSentinelsList - - boolean valueCopyright © 2014–2020 Redisson. All rights reserved.