public class RedisClusterConnectOptions extends RedisConnectOptions
| Constructor and Description |
|---|
RedisClusterConnectOptions() |
RedisClusterConnectOptions(JsonObject json) |
RedisClusterConnectOptions(RedisClusterConnectOptions other) |
RedisClusterConnectOptions(RedisOptions options) |
| Modifier and Type | Method and Description |
|---|---|
RedisReplicas |
getUseReplicas()
Get whether or not to use replica nodes (only considered in Cluster mode).
|
RedisClusterConnectOptions |
setConnectionString(String connectionString)
Sets a single connection string (endpoint) to use while connecting to the redis server.
|
RedisClusterConnectOptions |
setEndpoints(List<String> endpoints)
Set the endpoints to use while connecting to the redis server.
|
RedisClusterConnectOptions |
setMaxNestedArrays(int maxNestedArrays)
Tune how much nested arrays are allowed on a redis response.
|
RedisClusterConnectOptions |
setMaxWaitingHandlers(int maxWaitingHandlers)
The client will always work on pipeline mode, this means that messages can start queueing.
|
RedisClusterConnectOptions |
setPassword(String password)
Set the default password for cluster/sentinel connections.
|
RedisClusterConnectOptions |
setProtocolNegotiation(boolean protocolNegotiation)
Should the client perform
REST protocol negotiation during the connection acquire. |
RedisConnectOptions |
setUseReplicas(RedisReplicas useReplicas)
Set whether or not to use replica nodes (only considered in Cluster mode).
|
JsonObject |
toJson()
Converts this object to JSON notation.
|
addConnectionString, getEndpoint, getEndpoints, getMaxNestedArrays, getMaxWaitingHandlers, getPassword, isProtocolNegotiationpublic RedisClusterConnectOptions(RedisOptions options)
public RedisClusterConnectOptions()
public RedisClusterConnectOptions(RedisClusterConnectOptions other)
public RedisClusterConnectOptions(JsonObject json)
public RedisReplicas getUseReplicas()
public RedisConnectOptions setUseReplicas(RedisReplicas useReplicas)
useReplicas - the cluster replica use mode.public RedisClusterConnectOptions setMaxNestedArrays(int maxNestedArrays)
RedisConnectOptionssetMaxNestedArrays in class RedisConnectOptionsmaxNestedArrays - the configured max nested arrays allowance.public RedisClusterConnectOptions setProtocolNegotiation(boolean protocolNegotiation)
RedisConnectOptionsREST protocol negotiation during the connection acquire.
By default this is true, but there are situations when using broken servers it may
be useful to skip this and always fallback to RESP2 without using the HELLO
command.setProtocolNegotiation in class RedisConnectOptionsprotocolNegotiation - false to disable HELLO (not recommended) unless reasons...public RedisClusterConnectOptions setPassword(String password)
RedisConnectOptionssetPassword in class RedisConnectOptionspassword - the default passwordpublic RedisClusterConnectOptions setEndpoints(List<String> endpoints)
RedisConnectOptionssetEndpoints in class RedisConnectOptionsendpoints - list of socket addresses.public RedisClusterConnectOptions setConnectionString(String connectionString)
RedisConnectOptionssetConnectionString in class RedisConnectOptionsconnectionString - a string following the scheme: redis://[username:password@][host][:port][/[database].public RedisClusterConnectOptions setMaxWaitingHandlers(int maxWaitingHandlers)
RedisConnectOptionssetMaxWaitingHandlers in class RedisConnectOptionsmaxWaitingHandlers - max allowed queued waiting handlers.public JsonObject toJson()
toJson in class RedisConnectOptionsCopyright © 2023 Eclipse. All rights reserved.