Class RedisStandaloneConnectOptions

java.lang.Object
io.vertx.redis.client.RedisConnectOptions
io.vertx.redis.client.RedisStandaloneConnectOptions

public class RedisStandaloneConnectOptions extends RedisConnectOptions
  • Constructor Details

    • RedisStandaloneConnectOptions

      public RedisStandaloneConnectOptions()
    • RedisStandaloneConnectOptions

      public RedisStandaloneConnectOptions(RedisOptions options)
    • RedisStandaloneConnectOptions

      public RedisStandaloneConnectOptions(RedisStandaloneConnectOptions other)
    • RedisStandaloneConnectOptions

      public RedisStandaloneConnectOptions(JsonObject json)
  • Method Details

    • setMaxNestedArrays

      public RedisStandaloneConnectOptions setMaxNestedArrays(int maxNestedArrays)
      Description copied from class: RedisConnectOptions
      Tune how much nested arrays are allowed on a redis response. This affects the parser performance.
      Overrides:
      setMaxNestedArrays in class RedisConnectOptions
      Parameters:
      maxNestedArrays - the configured max nested arrays allowance.
      Returns:
      fluent self.
    • setProtocolNegotiation

      public RedisStandaloneConnectOptions setProtocolNegotiation(boolean protocolNegotiation)
      Description copied from class: RedisConnectOptions
      Should the client perform 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.
      Overrides:
      setProtocolNegotiation in class RedisConnectOptions
      Parameters:
      protocolNegotiation - false to disable HELLO (not recommended) unless reasons...
      Returns:
      fluent self
    • setPreferredProtocolVersion

      public RedisStandaloneConnectOptions setPreferredProtocolVersion(ProtocolVersion preferredProtocolVersion)
      Description copied from class: RedisConnectOptions
      Sets 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:
      setPreferredProtocolVersion in class RedisConnectOptions
      Parameters:
      preferredProtocolVersion - preferred protocol version
      Returns:
      fluent self
    • setUser

      public RedisStandaloneConnectOptions setUser(String user)
      Description copied from class: RedisConnectOptions
      Set the default username for Redis connections.
      Overrides:
      setUser in class RedisConnectOptions
      Parameters:
      user - the default username
      Returns:
      fluent self
    • setPassword

      public RedisStandaloneConnectOptions setPassword(String password)
      Description copied from class: RedisConnectOptions
      Set the default password for Redis connections.
      Overrides:
      setPassword in class RedisConnectOptions
      Parameters:
      password - the default password
      Returns:
      fluent self
    • setEndpoints

      public RedisStandaloneConnectOptions setEndpoints(List<String> endpoints)
      Description copied from class: RedisConnectOptions
      Set 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:
      setEndpoints in class RedisConnectOptions
      Parameters:
      endpoints - list of socket addresses.
      Returns:
      fluent self.
    • addConnectionString

      public RedisStandaloneConnectOptions addConnectionString(String connectionString)
      Description copied from class: RedisConnectOptions
      Adds 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:
      addConnectionString in class RedisConnectOptions
      Parameters:
      connectionString - a string URI following the scheme: redis://[username:password@][host][:port][/database]
      Returns:
      fluent self.
      See Also:
    • setConnectionString

      public RedisStandaloneConnectOptions setConnectionString(String connectionString)
      Description copied from class: RedisConnectOptions
      Sets a single connection string (endpoint) to use while connecting to the redis server. Will replace the previously configured connection strings.
      Overrides:
      setConnectionString in class RedisConnectOptions
      Parameters:
      connectionString - a string following the scheme: redis://[username:password@][host][:port][/[database].
      Returns:
      fluent self.
      See Also:
    • setMaxWaitingHandlers

      public RedisStandaloneConnectOptions setMaxWaitingHandlers(int maxWaitingHandlers)
      Description copied from class: RedisConnectOptions
      The 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:
      setMaxWaitingHandlers in class RedisConnectOptions
      Parameters:
      maxWaitingHandlers - max allowed queued waiting handlers.
      Returns:
      fluent self.
    • setClientId

      public RedisStandaloneConnectOptions setClientId(boolean clientId)
      Description copied from class: RedisConnectOptions
      Sets whether the client identifies itself to the server after the handshake using CLIENT SETINFO (Redis 7.2+). Disabling this skips the identification commands entirely.
      Overrides:
      setClientId in class RedisConnectOptions
      Parameters:
      clientId - false to disable self-identification.
      Returns:
      fluent self.
    • setClientIdSuffixes

      public RedisStandaloneConnectOptions setClientIdSuffixes(List<String> clientIdSuffixes)
      Description copied from class: RedisConnectOptions
      Sets the framework suffixes appended to the reported lib-name. The composed name has the form vertx-redis-client(suffix1;suffix2). Suffixes must consist of printable ASCII characters and must not contain (, ) or ;.
      Overrides:
      setClientIdSuffixes in class RedisConnectOptions
      Parameters:
      clientIdSuffixes - the library suffixes, may be null to report only the base name.
      Returns:
      fluent self.
    • addClientIdSuffix

      public RedisStandaloneConnectOptions addClientIdSuffix(String clientIdSuffix)
      Description copied from class: RedisConnectOptions
      Adds a single framework suffix appended to the reported lib-name.
      Overrides:
      addClientIdSuffix in class RedisConnectOptions
      Parameters:
      clientIdSuffix - the library suffix, must consist of printable ASCII characters and must not contain (, ) or ;.
      Returns:
      fluent self.
    • toJson

      public JsonObject toJson()
      Converts this object to JSON notation.
      Overrides:
      toJson in class RedisConnectOptions
      Returns:
      JSON