public class ClusterServersConfig extends BaseMasterSlaveServersConfig<ClusterServersConfig>
Constructor and Description |
---|
ClusterServersConfig() |
Modifier and Type | Method and Description |
---|---|
ClusterServersConfig |
addNodeAddress(String... addresses) |
int |
getDatabase() |
List<URI> |
getNodeAddresses() |
String |
getPassword() |
int |
getRetryAttempts() |
int |
getRetryInterval() |
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.
|
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)
public T setSubscriptionsPerConnection(int subscriptionsPerConnection)
subscriptionsPerConnection
- public int getSubscriptionsPerConnection()
public T setPassword(String password)
null
password
- 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)
0
database
- public int getDatabase()
public T setTimeout(int timeout)
Future
callback fails in case of async operation.timeout
- in millisecondspublic int getTimeout()
Copyright © 2014. All rights reserved.