Package io.vertx.redis.client
Class RedisStandaloneConnectOptions
- java.lang.Object
-
- io.vertx.redis.client.RedisConnectOptions
-
- io.vertx.redis.client.RedisStandaloneConnectOptions
-
public class RedisStandaloneConnectOptions extends RedisConnectOptions
-
-
Constructor Summary
Constructors Constructor Description RedisStandaloneConnectOptions()RedisStandaloneConnectOptions(JsonObject json)RedisStandaloneConnectOptions(RedisOptions options)RedisStandaloneConnectOptions(RedisStandaloneConnectOptions other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RedisStandaloneConnectOptionsaddConnectionString(String connectionString)Adds a connection string (endpoint) to use while connecting to the redis server.RedisStandaloneConnectOptionssetConnectionString(String connectionString)Sets a single connection string (endpoint) to use while connecting to the redis server.RedisStandaloneConnectOptionssetEndpoints(List<String> endpoints)Set the endpoints to use while connecting to the redis server.RedisStandaloneConnectOptionssetMaxNestedArrays(int maxNestedArrays)Tune how much nested arrays are allowed on a redis response.RedisStandaloneConnectOptionssetMaxWaitingHandlers(int maxWaitingHandlers)The client will always work on pipeline mode, this means that messages can start queueing.RedisStandaloneConnectOptionssetPassword(String password)Set the default password for Redis connections.RedisStandaloneConnectOptionssetPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)Sets the preferred protocol version to be used during protocol negotiation.RedisStandaloneConnectOptionssetProtocolNegotiation(boolean protocolNegotiation)Should the client performRESTprotocol negotiation during the connection acquire.RedisStandaloneConnectOptionssetUser(String user)Set the default username for Redis connections.JsonObjecttoJson()Converts this object to JSON notation.-
Methods inherited from class io.vertx.redis.client.RedisConnectOptions
getEndpoint, getEndpoints, getMaxNestedArrays, getMaxWaitingHandlers, getPassword, getPreferredProtocolVersion, getUser, isProtocolNegotiation
-
-
-
-
Constructor Detail
-
RedisStandaloneConnectOptions
public RedisStandaloneConnectOptions()
-
RedisStandaloneConnectOptions
public RedisStandaloneConnectOptions(RedisOptions options)
-
RedisStandaloneConnectOptions
public RedisStandaloneConnectOptions(RedisStandaloneConnectOptions other)
-
RedisStandaloneConnectOptions
public RedisStandaloneConnectOptions(JsonObject json)
-
-
Method Detail
-
setMaxNestedArrays
public RedisStandaloneConnectOptions setMaxNestedArrays(int maxNestedArrays)
Description copied from class:RedisConnectOptionsTune how much nested arrays are allowed on a redis response. This affects the parser performance.- Overrides:
setMaxNestedArraysin classRedisConnectOptions- Parameters:
maxNestedArrays- the configured max nested arrays allowance.- Returns:
- fluent self.
-
setProtocolNegotiation
public RedisStandaloneConnectOptions setProtocolNegotiation(boolean protocolNegotiation)
Description copied from class:RedisConnectOptionsShould the client performRESTprotocol negotiation during the connection acquire. By default this istrue, but there are situations when using broken servers it may be useful to skip this and always fallback toRESP2without using theHELLOcommand.- Overrides:
setProtocolNegotiationin classRedisConnectOptions- Parameters:
protocolNegotiation- false to disableHELLO(not recommended) unless reasons...- Returns:
- fluent self
-
setPreferredProtocolVersion
public RedisStandaloneConnectOptions setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
Description copied from class:RedisConnectOptionsSets the preferred protocol version to be used during protocol negotiation. When not set, defaults to RESP 3. When protocol negotiation is disabled, this setting has no effect.- Overrides:
setPreferredProtocolVersionin classRedisConnectOptions- Parameters:
preferredProtocolVersion- preferred protocol version- Returns:
- fluent self
-
setUser
public RedisStandaloneConnectOptions setUser(String user)
Description copied from class:RedisConnectOptionsSet the default username for Redis connections.- Overrides:
setUserin classRedisConnectOptions- Parameters:
user- the default username- Returns:
- fluent self
-
setPassword
public RedisStandaloneConnectOptions setPassword(String password)
Description copied from class:RedisConnectOptionsSet the default password for Redis connections.- Overrides:
setPasswordin classRedisConnectOptions- Parameters:
password- the default password- Returns:
- fluent self
-
setEndpoints
public RedisStandaloneConnectOptions setEndpoints(List<String> endpoints)
Description copied from class:RedisConnectOptionsSet the endpoints to use while connecting to the redis server. Only the cluster mode will consider more than 1 element. If more are provided, they are not considered by the client when in single server mode.- Overrides:
setEndpointsin classRedisConnectOptions- Parameters:
endpoints- list of socket addresses.- Returns:
- fluent self.
-
addConnectionString
public RedisStandaloneConnectOptions addConnectionString(String connectionString)
Description copied from class:RedisConnectOptionsAdds a connection string (endpoint) to use while connecting to the redis server. Only the cluster mode will consider more than 1 element. If more are provided, they are not considered by the client when in single server mode.- Overrides:
addConnectionStringin classRedisConnectOptions- Parameters:
connectionString- a string URI following the scheme: redis://[username:password@][host][:port][/database]- Returns:
- fluent self.
- See Also:
- Redis scheme on iana.org
-
setConnectionString
public RedisStandaloneConnectOptions setConnectionString(String connectionString)
Description copied from class:RedisConnectOptionsSets a single connection string (endpoint) to use while connecting to the redis server. Will replace the previously configured connection strings.- Overrides:
setConnectionStringin classRedisConnectOptions- Parameters:
connectionString- a string following the scheme: redis://[username:password@][host][:port][/[database].- Returns:
- fluent self.
- See Also:
- Redis scheme on iana.org
-
setMaxWaitingHandlers
public RedisStandaloneConnectOptions setMaxWaitingHandlers(int maxWaitingHandlers)
Description copied from class:RedisConnectOptionsThe client will always work on pipeline mode, this means that messages can start queueing. You can control how much backlog you're willing to accept. This methods sets how much handlers is the client willing to queue.- Overrides:
setMaxWaitingHandlersin classRedisConnectOptions- Parameters:
maxWaitingHandlers- max allowed queued waiting handlers.- Returns:
- fluent self.
-
toJson
public JsonObject toJson()
Converts this object to JSON notation.- Overrides:
toJsonin classRedisConnectOptions- Returns:
- JSON
-
-