Package org.redisson.config
Class ClusterServersConfig
- java.lang.Object
-
- org.redisson.config.BaseConfig<T>
-
- org.redisson.config.BaseMasterSlaveServersConfig<ClusterServersConfig>
-
- org.redisson.config.ClusterServersConfig
-
public class ClusterServersConfig extends BaseMasterSlaveServersConfig<ClusterServersConfig>
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description ClusterServersConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ClusterServersConfig
addNodeAddress(String... addresses)
Add Redis cluster node address.NatMapper
getNatMapper()
List<String>
getNodeAddresses()
int
getScanInterval()
boolean
isCheckSlotsCoverage()
ClusterServersConfig
setCheckSlotsCoverage(boolean checkSlotsCoverage)
Enables cluster slots check during Redisson startup.ClusterServersConfig
setNatMap(Map<String,String> natMap)
Deprecated.ClusterServersConfig
setNatMapper(NatMapper natMapper)
Defines NAT mapper which maps Redis URI object.void
setNodeAddresses(List<String> nodeAddresses)
ClusterServersConfig
setScanInterval(int scanInterval)
Redis cluster scan interval in milliseconds-
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
-
addNodeAddress
public ClusterServersConfig addNodeAddress(String... addresses)
Add Redis cluster node address. Use follow format --host:port
- Parameters:
addresses
- inhost:port
format- Returns:
- config
-
getScanInterval
public int getScanInterval()
-
setScanInterval
public ClusterServersConfig setScanInterval(int scanInterval)
Redis cluster scan interval in millisecondsDefault is
5000
- Parameters:
scanInterval
- in milliseconds- Returns:
- config
-
isCheckSlotsCoverage
public boolean isCheckSlotsCoverage()
-
setCheckSlotsCoverage
public ClusterServersConfig setCheckSlotsCoverage(boolean checkSlotsCoverage)
Enables cluster slots check during Redisson startup.Default is
true
- Parameters:
checkSlotsCoverage
- - boolean value- Returns:
- config
-
setNatMap
@Deprecated public ClusterServersConfig setNatMap(Map<String,String> natMap)
Deprecated.
-
getNatMapper
public NatMapper getNatMapper()
-
setNatMapper
public ClusterServersConfig setNatMapper(NatMapper natMapper)
Defines NAT mapper which maps Redis URI object. Applied to all Redis connections.- Parameters:
natMapper
- - nat mapper object- Returns:
- config
- See Also:
HostNatMapper
,HostPortNatMapper
-
-