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 |
setMaxLineLength(int maxLineLength)
Set the maximum length (in bytes) of a single RESP line (a simple string, an error, or a
type header) that may be buffered before its
\r\n terminator is found. |
RedisStandaloneConnectOptions |
setMaxMultiLength(int maxMultiLength)
Set the maximum number of elements allowed in any single RESP multi-bulk response
(array, map, set, push, attribute).
|
RedisStandaloneConnectOptions |
setMaxNestedArrays(int maxNestedArrays)
Tune how much nested arrays are allowed on a redis response.
|
RedisStandaloneConnectOptions |
setMaxStringLength(long maxStringLength)
Set the maximum length (in bytes) of a single RESP bulk (bulk string or verbatim string) payload.
|
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, getMaxLineLength, getMaxMultiLength, getMaxNestedArrays, getMaxStringLength, getMaxWaitingHandlers, getPassword, getPreferredProtocolVersion, isProtocolNegotiationpublic RedisStandaloneConnectOptions()
public RedisStandaloneConnectOptions(RedisOptions options)
public RedisStandaloneConnectOptions(RedisStandaloneConnectOptions other)
public RedisStandaloneConnectOptions(JsonObject json)
public RedisStandaloneConnectOptions setMaxNestedArrays(int maxNestedArrays)
RedisConnectOptionssetMaxNestedArrays in class RedisConnectOptionsmaxNestedArrays - the configured max nested arrays allowance.public RedisStandaloneConnectOptions setMaxMultiLength(int maxMultiLength)
RedisConnectOptions
Users with legitimate large responses (e.g. large LRANGE) can increase this value.
setMaxMultiLength in class RedisConnectOptionsmaxMultiLength - the maximum multi-bulk length.public RedisStandaloneConnectOptions setMaxLineLength(int maxLineLength)
RedisConnectOptions\r\n terminator is found. Lines exceeding
this limit cause the connection to be closed with an error. The default value is 128 KB.setMaxLineLength in class RedisConnectOptionsmaxLineLength - the maximum line length, in bytes.public RedisStandaloneConnectOptions setMaxStringLength(long maxStringLength)
RedisConnectOptionssetMaxStringLength in class RedisConnectOptionsmaxStringLength - the maximum string length, in bytes.public RedisStandaloneConnectOptions 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 RedisStandaloneConnectOptions setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
RedisConnectOptionssetPreferredProtocolVersion in class RedisConnectOptionspreferredProtocolVersion - preferred protocol versionpublic RedisStandaloneConnectOptions setPassword(String password)
RedisConnectOptionssetPassword in class RedisConnectOptionspassword - the default passwordpublic RedisStandaloneConnectOptions setEndpoints(List<String> endpoints)
RedisConnectOptionssetEndpoints in class RedisConnectOptionsendpoints - list of socket addresses.public RedisStandaloneConnectOptions addConnectionString(String connectionString)
RedisConnectOptionsaddConnectionString in class RedisConnectOptionsconnectionString - a string URI following the scheme: redis://[username:password@][host][:port][/database]public RedisStandaloneConnectOptions setConnectionString(String connectionString)
RedisConnectOptionssetConnectionString in class RedisConnectOptionsconnectionString - a string following the scheme: redis://[username:password@][host][:port][/[database].public RedisStandaloneConnectOptions setMaxWaitingHandlers(int maxWaitingHandlers)
RedisConnectOptionssetMaxWaitingHandlers in class RedisConnectOptionsmaxWaitingHandlers - max allowed queued waiting handlers.public JsonObject toJson()
toJson in class RedisConnectOptionsCopyright © 2026 Eclipse. All rights reserved.