public class RedisStandaloneConnectOptions extends RedisConnectOptions
Constructor and Description |
---|
RedisStandaloneConnectOptions() |
RedisStandaloneConnectOptions(JsonObject json) |
RedisStandaloneConnectOptions(RedisOptions options) |
RedisStandaloneConnectOptions(RedisStandaloneConnectOptions other) |
Modifier and Type | Method and Description |
---|---|
RedisStandaloneConnectOptions |
addConnectionString(String connectionString)
Adds a connection string (endpoint) to use while connecting to the redis server.
|
RedisStandaloneConnectOptions |
setConnectionString(String connectionString)
Sets a single connection string (endpoint) to use while connecting to the redis server.
|
RedisStandaloneConnectOptions |
setEndpoints(List<String> endpoints)
Set the endpoints to use while connecting to the redis server.
|
RedisStandaloneConnectOptions |
setMaxNestedArrays(int maxNestedArrays)
Tune how much nested arrays are allowed on a redis response.
|
RedisStandaloneConnectOptions |
setMaxWaitingHandlers(int maxWaitingHandlers)
The client will always work on pipeline mode, this means that messages can start queueing.
|
RedisStandaloneConnectOptions |
setPassword(String password)
Set the default password for cluster/sentinel connections.
|
RedisStandaloneConnectOptions |
setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
Sets the preferred protocol version to be used during protocol negotiation.
|
RedisStandaloneConnectOptions |
setProtocolNegotiation(boolean protocolNegotiation)
Should the client perform
REST protocol negotiation during the connection acquire. |
JsonObject |
toJson()
Converts this object to JSON notation.
|
getEndpoint, getEndpoints, getMaxNestedArrays, getMaxWaitingHandlers, getPassword, getPreferredProtocolVersion, isProtocolNegotiation
public RedisStandaloneConnectOptions()
public RedisStandaloneConnectOptions(RedisOptions options)
public RedisStandaloneConnectOptions(RedisStandaloneConnectOptions other)
public RedisStandaloneConnectOptions(JsonObject json)
public RedisStandaloneConnectOptions setMaxNestedArrays(int maxNestedArrays)
RedisConnectOptions
setMaxNestedArrays
in class RedisConnectOptions
maxNestedArrays
- the configured max nested arrays allowance.public RedisStandaloneConnectOptions setProtocolNegotiation(boolean protocolNegotiation)
RedisConnectOptions
REST
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 RedisConnectOptions
protocolNegotiation
- false to disable HELLO
(not recommended) unless reasons...public RedisStandaloneConnectOptions setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
RedisConnectOptions
setPreferredProtocolVersion
in class RedisConnectOptions
preferredProtocolVersion
- preferred protocol versionpublic RedisStandaloneConnectOptions setPassword(String password)
RedisConnectOptions
setPassword
in class RedisConnectOptions
password
- the default passwordpublic RedisStandaloneConnectOptions setEndpoints(List<String> endpoints)
RedisConnectOptions
setEndpoints
in class RedisConnectOptions
endpoints
- list of socket addresses.public RedisStandaloneConnectOptions addConnectionString(String connectionString)
RedisConnectOptions
addConnectionString
in class RedisConnectOptions
connectionString
- a string URI following the scheme: redis://[username:password@][host][:port][/database]public RedisStandaloneConnectOptions setConnectionString(String connectionString)
RedisConnectOptions
setConnectionString
in class RedisConnectOptions
connectionString
- a string following the scheme: redis://[username:password@][host][:port][/[database].public RedisStandaloneConnectOptions setMaxWaitingHandlers(int maxWaitingHandlers)
RedisConnectOptions
setMaxWaitingHandlers
in class RedisConnectOptions
maxWaitingHandlers
- max allowed queued waiting handlers.public JsonObject toJson()
toJson
in class RedisConnectOptions
Copyright © 2024 Eclipse. All rights reserved.