public class ClusterServersConfig extends BaseMasterSlaveServersConfig<ClusterServersConfig>
Constructor and Description |
---|
ClusterServersConfig() |
Modifier and Type | Method and Description |
---|---|
ClusterServersConfig |
addNodeAddress(String... addresses)
Add Redis cluster node address.
|
String |
getClientName() |
int |
getConnectTimeout() |
int |
getFailedAttempts() |
int |
getIdleConnectionTimeout() |
List<URI> |
getNodeAddresses() |
String |
getPassword() |
int |
getPingTimeout() |
int |
getReconnectionTimeout() |
int |
getRetryAttempts() |
int |
getRetryInterval() |
int |
getScanInterval() |
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 |
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 |
setPassword(String password)
Password for Redis authentication.
|
T |
setPingTimeout(int pingTimeout)
Ping timeout used in
Node.ping and Node.pingAll |
ClusterServersConfig |
setReadFromSlaves(boolean readFromSlaves)
Deprecated.
|
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.
|
ClusterServersConfig |
setScanInterval(int scanInterval)
Redis cluster scan interval in milliseconds
|
T |
setSubscriptionsPerConnection(int subscriptionsPerConnection)
Subscriptions per Redis connection limit
Default is 5
|
T |
setTimeout(int timeout)
Redis server response timeout.
|
getLoadBalancer, getMasterConnectionMinimumIdleSize, getMasterConnectionPoolSize, getReadMode, getSlaveConnectionMinimumIdleSize, getSlaveConnectionPoolSize, getSlaveSubscriptionConnectionMinimumIdleSize, getSlaveSubscriptionConnectionPoolSize, setLoadBalancer, setMasterConnectionMinimumIdleSize, setMasterConnectionPoolSize, setReadMode, setSlaveConnectionMinimumIdleSize, setSlaveConnectionPoolSize, setSlaveSubscriptionConnectionMinimumIdleSize, setSlaveSubscriptionConnectionPoolSize
public ClusterServersConfig addNodeAddress(String... addresses)
host:port
addresses
- in host:port
formatpublic int getScanInterval()
public ClusterServersConfig setScanInterval(int scanInterval)
scanInterval
- in milliseconds@Deprecated public ClusterServersConfig setReadFromSlaves(boolean readFromSlaves)
#setReadMode(org.redisson.BaseMasterSlaveServersConfig.ReadMode)
readFromSlaves
- 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 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.