public class BaseMasterSlaveServersConfig<T extends BaseMasterSlaveServersConfig<T>> extends Object
Constructor and Description |
---|
BaseMasterSlaveServersConfig() |
Modifier and Type | Method and Description |
---|---|
String |
getClientName() |
int |
getConnectTimeout() |
int |
getDatabase() |
int |
getFailedAttempts() |
int |
getIdleConnectionTimeout() |
LoadBalancer |
getLoadBalancer() |
int |
getMasterConnectionMinimumIdleSize() |
int |
getMasterConnectionPoolSize() |
String |
getPassword() |
int |
getPingTimeout() |
int |
getReconnectionTimeout() |
int |
getRetryAttempts() |
int |
getRetryInterval() |
int |
getSlaveConnectionMinimumIdleSize() |
int |
getSlaveConnectionPoolSize() |
int |
getSlaveSubscriptionConnectionMinimumIdleSize() |
int |
getSlaveSubscriptionConnectionPoolSize() |
int |
getSubscriptionsPerConnection() |
int |
getTimeout() |
T |
setClientName(String clientName)
Setup connection name during connection init
via CLIENT SETNAME command
|
T |
setConnectTimeout(int connectTimeout)
Timeout during connecting to any Redis server.
|
T |
setDatabase(int database)
Database index used for Redis connection
Default is
0 |
T |
setFailedAttempts(int slaveFailedAttempts)
Redis server will be excluded from the internal list of available nodes
when sequential unsuccessful execution attempts of any Redis command
on this server reaches
failedAttempts . |
T |
setIdleConnectionTimeout(int idleConnectionTimeout)
If pooled connection not used for a
timeout time
and current connections amount bigger than minimum idle connections pool size,
then it will closed and removed from pool. |
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 5
|
T |
setMasterConnectionPoolSize(int masterConnectionPoolSize)
Redis 'master' server connection pool size.
|
T |
setPassword(String password)
Password for Redis authentication.
|
T |
setPingTimeout(int pingTimeout)
Ping timeout used in
Node.ping and Node.pingAll |
T |
setReconnectionTimeout(int slaveRetryTimeout)
Reconnection attempt timeout to Redis server when
it has been excluded from internal list of available servers.
|
T |
setRetryAttempts(int retryAttempts)
Error will be thrown if Redis command can't be sended to Redis server after
retryAttempts . |
T |
setRetryInterval(int retryInterval)
Time interval after which another one attempt to send Redis command will be executed.
|
T |
setSlaveConnectionMinimumIdleSize(int slaveConnectionMinimumIdleSize)
Redis 'slave' node minimum idle connection amount for each slave node
Default is 5
|
T |
setSlaveConnectionPoolSize(int slaveConnectionPoolSize)
Redis 'slave' servers connection pool size for each slave node.
|
T |
setSlaveSubscriptionConnectionMinimumIdleSize(int slaveSubscriptionConnectionMinimumIdleSize)
Redis 'slave' node minimum idle subscription (pub/sub) connection amount for each slave node
Default is 1
|
T |
setSlaveSubscriptionConnectionPoolSize(int slaveSubscriptionConnectionPoolSize)
Redis 'slave' node maximum subscription (pub/sub) connection pool size for each slave node
Default is 25
|
T |
setSubscriptionsPerConnection(int subscriptionsPerConnection)
Subscriptions per Redis connection limit
Default is 5
|
T |
setTimeout(int timeout)
Redis server response timeout.
|
public T setSlaveConnectionPoolSize(int slaveConnectionPoolSize)
slaveConnectionPoolSize
- public int getSlaveConnectionPoolSize()
public T setMasterConnectionPoolSize(int masterConnectionPoolSize)
public int getMasterConnectionPoolSize()
public T setLoadBalancer(LoadBalancer loadBalancer)
loadBalancer
- RoundRobinLoadBalancer
,
org.redisson.connection.BaseLoadBalancer
public LoadBalancer getLoadBalancer()
public T setSlaveSubscriptionConnectionPoolSize(int slaveSubscriptionConnectionPoolSize)
public int getSlaveSubscriptionConnectionPoolSize()
public T setSlaveConnectionMinimumIdleSize(int slaveConnectionMinimumIdleSize)
public int getSlaveConnectionMinimumIdleSize()
public T setMasterConnectionMinimumIdleSize(int masterConnectionMinimumIdleSize)
public int getMasterConnectionMinimumIdleSize()
public T setSlaveSubscriptionConnectionMinimumIdleSize(int slaveSubscriptionConnectionMinimumIdleSize)
public int getSlaveSubscriptionConnectionMinimumIdleSize()
public T setSubscriptionsPerConnection(int subscriptionsPerConnection)
subscriptionsPerConnection
- public int getSubscriptionsPerConnection()
public T setPassword(String password)
null
password
- public String getPassword()
public T setRetryAttempts(int retryAttempts)
retryAttempts
.
But if it sent succesfully then timeout
will be started.retryAttempts
- timeout
public int getRetryAttempts()
public T setRetryInterval(int retryInterval)
retryInterval
- - time in millisecondsretryAttempts
public int getRetryInterval()
public T setDatabase(int database)
0
database
- public int getDatabase()
public T setTimeout(int timeout)
timeout
- in millisecondspublic int getTimeout()
public T setClientName(String clientName)
name
- public String getClientName()
public T setPingTimeout(int pingTimeout)
Node.ping
and Node.pingAll operation
ping
- timeout in millisecondspublic int getPingTimeout()
public T setConnectTimeout(int connectTimeout)
connectTimeout
- - timeout in millisecondspublic int getConnectTimeout()
public T setIdleConnectionTimeout(int idleConnectionTimeout)
timeout
time
and current connections amount bigger than minimum idle connections pool size,
then it will closed and removed from pool.idleConnectionTimeout
- - timeout in millisecondspublic int getIdleConnectionTimeout()
public T setReconnectionTimeout(int slaveRetryTimeout)
failedAttempts
public int getReconnectionTimeout()
public T setFailedAttempts(int slaveFailedAttempts)
failedAttempts
.
Default is 3public int getFailedAttempts()
Copyright © 2014–2016. All rights reserved.