T
- config typepublic class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig<T>> extends BaseConfig<T>
Constructor and Description |
---|
BaseMasterSlaveServersConfig() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkSkipSlavesInit() |
long |
getDnsMonitoringInterval() |
int |
getFailedSlaveCheckInterval() |
int |
getFailedSlaveReconnectionInterval() |
LoadBalancer |
getLoadBalancer() |
int |
getMasterConnectionMinimumIdleSize() |
int |
getMasterConnectionPoolSize() |
ReadMode |
getReadMode() |
int |
getSlaveConnectionMinimumIdleSize() |
int |
getSlaveConnectionPoolSize() |
int |
getSubscriptionConnectionMinimumIdleSize() |
int |
getSubscriptionConnectionPoolSize() |
SubscriptionMode |
getSubscriptionMode() |
T |
setDnsMonitoringInterval(long dnsMonitoringInterval)
Interval in milliseconds to check the endpoint's DNS
Applications must ensure the JVM DNS cache TTL is low enough to support this.
|
T |
setFailedSlaveCheckInterval(int slaveFailsInterval)
Redis Slave node failing to execute commands is excluded from the internal list of available nodes
when the time interval from the moment of first Redis command execution failure
on this server reaches
slaveFailsInterval value. |
T |
setFailedSlaveReconnectionInterval(int failedSlavesReconnectionTimeout)
Interval of Redis Slave reconnection attempt when
it was excluded from internal list of available servers.
|
T |
setLoadBalancer(LoadBalancer loadBalancer)
Сonnection load balancer to multiple Redis slave servers.
|
T |
setMasterConnectionMinimumIdleSize(int masterConnectionMinimumIdleSize)
Redis 'master' node minimum idle connection amount for each slave node
Default is
24
|
T |
setMasterConnectionPoolSize(int masterConnectionPoolSize)
Redis 'master' server connection pool size.
|
T |
setReadMode(ReadMode readMode)
Set node type used for read operation.
|
T |
setSlaveConnectionMinimumIdleSize(int slaveConnectionMinimumIdleSize)
Minimum idle connection pool size for subscription (pub/sub) channels
Default is
24
|
T |
setSlaveConnectionPoolSize(int slaveConnectionPoolSize)
Redis 'slave' servers connection pool size for each slave node.
|
T |
setSubscriptionConnectionMinimumIdleSize(int subscriptionConnectionMinimumIdleSize)
Redis 'slave' node minimum idle subscription (pub/sub) connection amount for each slave node.
|
T |
setSubscriptionConnectionPoolSize(int subscriptionConnectionPoolSize)
Maximum connection pool size for subscription (pub/sub) channels
Default is
50
|
T |
setSubscriptionMode(SubscriptionMode subscriptionMode)
Set node type used for subscription operation.
|
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 T setSlaveConnectionPoolSize(int slaveConnectionPoolSize)
Default is 64
slaveConnectionPoolSize
- - size of poolsetSlaveConnectionMinimumIdleSize(int)
public int getSlaveConnectionPoolSize()
public T setFailedSlaveReconnectionInterval(int failedSlavesReconnectionTimeout)
On every such timeout event Redisson tries to connect to disconnected Redis server.
Default is 3000
failedSlavesReconnectionTimeout
- - retry timeout in millisecondspublic int getFailedSlaveReconnectionInterval()
public T setFailedSlaveCheckInterval(int slaveFailsInterval)
slaveFailsInterval
value.
Default is 180000
slaveFailsInterval
- - time interval in millisecondspublic int getFailedSlaveCheckInterval()
public T setMasterConnectionPoolSize(int masterConnectionPoolSize)
Default is 64
masterConnectionPoolSize
- - pool sizesetMasterConnectionMinimumIdleSize(int)
public int getMasterConnectionPoolSize()
public T setLoadBalancer(LoadBalancer loadBalancer)
loadBalancer
- objectRandomLoadBalancer
,
RoundRobinLoadBalancer
,
WeightedRoundRobinBalancer
public LoadBalancer getLoadBalancer()
public T setSubscriptionConnectionPoolSize(int subscriptionConnectionPoolSize)
Default is 50
subscriptionConnectionPoolSize
- - pool sizesetSubscriptionConnectionMinimumIdleSize(int)
public int getSubscriptionConnectionPoolSize()
public T setSlaveConnectionMinimumIdleSize(int slaveConnectionMinimumIdleSize)
Default is 24
slaveConnectionMinimumIdleSize
- - pool sizesetSlaveConnectionPoolSize(int)
public int getSlaveConnectionMinimumIdleSize()
public T setMasterConnectionMinimumIdleSize(int masterConnectionMinimumIdleSize)
Default is 24
masterConnectionMinimumIdleSize
- - pool sizesetMasterConnectionPoolSize(int)
public int getMasterConnectionMinimumIdleSize()
public T setSubscriptionConnectionMinimumIdleSize(int subscriptionConnectionMinimumIdleSize)
Default is 1
subscriptionConnectionMinimumIdleSize
- - pool sizesetSubscriptionConnectionPoolSize(int)
public int getSubscriptionConnectionMinimumIdleSize()
public T setReadMode(ReadMode readMode)
Default is SLAVE
readMode
- parampublic ReadMode getReadMode()
public boolean checkSkipSlavesInit()
public T setSubscriptionMode(SubscriptionMode subscriptionMode)
Default is MASTER
subscriptionMode
- parampublic SubscriptionMode getSubscriptionMode()
public T setDnsMonitoringInterval(long dnsMonitoringInterval)
Applications must ensure the JVM DNS cache TTL is low enough to support this.
Set -1
to disable.
Default is 5000
.
dnsMonitoringInterval
- timepublic long getDnsMonitoringInterval()
Copyright © 2014–2020 Redisson. All rights reserved.