public class RedisReplicationConnectOptions extends RedisConnectOptions
| Constructor and Description |
|---|
RedisReplicationConnectOptions() |
RedisReplicationConnectOptions(JsonObject json) |
RedisReplicationConnectOptions(RedisOptions options) |
RedisReplicationConnectOptions(RedisReplicationConnectOptions other) |
| Modifier and Type | Method and Description |
|---|---|
RedisReplicationConnectOptions |
addConnectionString(String connectionString)
Adds a connection string (endpoint) to use while connecting to the redis server.
|
RedisTopology |
getTopology()
Get how the topology should be obtained.
|
RedisReplicas |
getUseReplicas()
Get whether to use replica nodes for read only queries.
|
RedisReplicationConnectOptions |
setConnectionString(String connectionString)
Sets a single connection string (endpoint) to use while connecting to the redis server.
|
RedisReplicationConnectOptions |
setEndpoints(List<String> endpoints)
Set the endpoints to use while connecting to the redis server.
|
RedisReplicationConnectOptions |
setMaxNestedArrays(int maxNestedArrays)
Tune how much nested arrays are allowed on a redis response.
|
RedisReplicationConnectOptions |
setMaxWaitingHandlers(int maxWaitingHandlers)
The client will always work on pipeline mode, this means that messages can start queueing.
|
RedisReplicationConnectOptions |
setPassword(String password)
Set the default password for cluster/sentinel connections.
|
RedisReplicationConnectOptions |
setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
Sets the preferred protocol version to be used during protocol negotiation.
|
RedisReplicationConnectOptions |
setProtocolNegotiation(boolean protocolNegotiation)
Should the client perform
REST protocol negotiation during the connection acquire. |
RedisReplicationConnectOptions |
setTopology(RedisTopology topology)
Set how the topology should be obtained.
|
RedisReplicationConnectOptions |
setUseReplicas(RedisReplicas useReplicas)
Set whether to use replica nodes for read only queries.
|
JsonObject |
toJson()
Converts this object to JSON notation.
|
getEndpoint, getEndpoints, getMaxNestedArrays, getMaxWaitingHandlers, getPassword, getPreferredProtocolVersion, isProtocolNegotiationpublic RedisReplicationConnectOptions()
public RedisReplicationConnectOptions(RedisOptions options)
public RedisReplicationConnectOptions(RedisReplicationConnectOptions other)
public RedisReplicationConnectOptions(JsonObject json)
public RedisTopology getTopology()
public RedisReplicationConnectOptions setTopology(RedisTopology topology)
topology - the topology modepublic RedisReplicas getUseReplicas()
public RedisReplicationConnectOptions setUseReplicas(RedisReplicas useReplicas)
useReplicas - the cluster replica use mode.public RedisReplicationConnectOptions setMaxNestedArrays(int maxNestedArrays)
RedisConnectOptionssetMaxNestedArrays in class RedisConnectOptionsmaxNestedArrays - the configured max nested arrays allowance.public RedisReplicationConnectOptions 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 RedisReplicationConnectOptions setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
RedisConnectOptionssetPreferredProtocolVersion in class RedisConnectOptionspreferredProtocolVersion - preferred protocol versionpublic RedisReplicationConnectOptions setPassword(String password)
RedisConnectOptionssetPassword in class RedisConnectOptionspassword - the default passwordpublic RedisReplicationConnectOptions setEndpoints(List<String> endpoints)
RedisConnectOptionssetEndpoints in class RedisConnectOptionsendpoints - list of socket addresses.public RedisReplicationConnectOptions addConnectionString(String connectionString)
RedisConnectOptionsaddConnectionString in class RedisConnectOptionsconnectionString - a string URI following the scheme: redis://[username:password@][host][:port][/database]public RedisReplicationConnectOptions setConnectionString(String connectionString)
RedisConnectOptionssetConnectionString in class RedisConnectOptionsconnectionString - a string following the scheme: redis://[username:password@][host][:port][/[database].public RedisReplicationConnectOptions setMaxWaitingHandlers(int maxWaitingHandlers)
RedisConnectOptionssetMaxWaitingHandlers in class RedisConnectOptionsmaxWaitingHandlers - max allowed queued waiting handlers.public JsonObject toJson()
toJson in class RedisConnectOptionsCopyright © 2025 Eclipse. All rights reserved.