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.
|
int |
getDatabase() |
List<URI> |
getNodeAddresses() |
String |
getPassword() |
int |
getRetryAttempts() |
int |
getRetryInterval() |
int |
getScanInterval() |
int |
getSubscriptionsPerConnection() |
int |
getTimeout() |
T |
setDatabase(int database)
Database index used for Redis connection
Default is
0 |
T |
setPassword(String password)
Password for Redis authentication.
|
T |
setRetryAttempts(int retryAttempts)
Reconnection attempts amount.
|
T |
setRetryInterval(int retryInterval)
Time pause before next reconnection attempt.
|
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 operation execution timeout.
|
public ClusterServersConfig addNodeAddress(String... addresses)
host:portaddresses - in host:port formatpublic int getScanInterval()
public ClusterServersConfig setScanInterval(int scanInterval)
scanInterval - in millisecondspublic T setSubscriptionsPerConnection(int subscriptionsPerConnection)
subscriptionsPerConnection - public int getSubscriptionsPerConnection()
public T setPassword(String password)
nullpassword - public String getPassword()
public T setRetryAttempts(int retryAttempts)
Future callback fails in case of async operation.
Used then connection with redis server is down.retryAttempts - public int getRetryAttempts()
public T setRetryInterval(int retryInterval)
retryInterval - - time in millisecondspublic int getRetryInterval()
public T setDatabase(int database)
0database - public int getDatabase()
public T setTimeout(int timeout)
Future callback fails in case of async operation.timeout - in millisecondspublic int getTimeout()
Copyright © 2014–2015. All rights reserved.