public class MasterSlaveServersConfig extends BaseMasterSlaveServersConfig<MasterSlaveServersConfig>
Constructor and Description |
---|
MasterSlaveServersConfig() |
Modifier and Type | Method and Description |
---|---|
MasterSlaveServersConfig |
addSlaveAddress(String... sAddresses)
Add Redis slave server address.
|
int |
getDatabase() |
URI |
getMasterAddress() |
String |
getPassword() |
int |
getRetryAttempts() |
int |
getRetryInterval() |
List<URI> |
getSlaveAddresses() |
int |
getSubscriptionsPerConnection() |
int |
getTimeout() |
T |
setDatabase(int database)
Database index used for Redis connection
Default is
0 |
MasterSlaveServersConfig |
setMasterAddress(String masterAddress)
Set Redis master server address.
|
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 MasterSlaveServersConfig setMasterAddress(String masterAddress)
masterAddress
- public URI getMasterAddress()
public MasterSlaveServersConfig addSlaveAddress(String... sAddresses)
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.