io.vertx.redis.client

## Class RedisSentinelConnectOptions

- java.lang.Object
- - io.vertx.redis.client.RedisConnectOptions
  - - io.vertx.redis.client.RedisSentinelConnectOptions

-     public class RedisSentinelConnectOptions
      extends RedisConnectOptions

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RedisSentinelConnectOptions()`
    `RedisSentinelConnectOptions(JsonObject json)`
    `RedisSentinelConnectOptions(RedisOptions options)`
    `RedisSentinelConnectOptions(RedisSentinelConnectOptions other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMasterName()` Get the master name (only considered in HA mode).
    `RedisRole` | `getRole()` Get the role name (only considered in HA mode).
    `RedisSentinelConnectOptions` | `setConnectionString(String connectionString)` Sets a single connection string (endpoint) to use while connecting to the redis server.
    `RedisSentinelConnectOptions` | `setEndpoints(List<String> endpoints)` Set the endpoints to use while connecting to the redis server.
    `RedisConnectOptions` | `setMasterName(String masterName)` Set the master name (only considered in HA mode).
    `RedisSentinelConnectOptions` | `setMaxNestedArrays(int maxNestedArrays)` Tune how much nested arrays are allowed on a redis response.
    `RedisSentinelConnectOptions` | `setMaxWaitingHandlers(int maxWaitingHandlers)` The client will always work on pipeline mode, this means that messages can start queueing.
    `RedisSentinelConnectOptions` | `setPassword(String password)` Set the default password for cluster/sentinel connections.
    `RedisSentinelConnectOptions` | `setProtocolNegotiation(boolean protocolNegotiation)` Should the client perform `REST` protocol negotiation during the connection acquire.
    `RedisConnectOptions` | `setRole(RedisRole role)` Set the role name (only considered in HA mode).
    `JsonObject` | `toJson()` Converts this object to JSON notation.

    - ### Methods inherited from class io.vertx.redis.client.RedisConnectOptions

      `addConnectionString, getEndpoint, getEndpoints, getMaxNestedArrays, getMaxWaitingHandlers, getPassword, isProtocolNegotiation`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RedisSentinelConnectOptions

          public RedisSentinelConnectOptions(RedisOptions options)

    - #### RedisSentinelConnectOptions

          public RedisSentinelConnectOptions()

    - #### RedisSentinelConnectOptions

          public RedisSentinelConnectOptions(RedisSentinelConnectOptions other)

    - #### RedisSentinelConnectOptions

          public RedisSentinelConnectOptions(JsonObject json)

  - ### Method Detail

    - #### getRole

          public RedisRole getRole()

      Get the role name (only considered in HA mode).
      Returns:
        the master name.

    - #### setRole

          public RedisConnectOptions setRole(RedisRole role)

      Set the role name (only considered in HA mode).
      Parameters:
        `role` - the master name.
      Returns:
        fluent self.

    - #### getMasterName

          public String getMasterName()

      Get the master name (only considered in HA mode).
      Returns:
        the master name.

    - #### setMasterName

          public RedisConnectOptions setMasterName(String masterName)

      Set the master name (only considered in HA mode).
      Parameters:
        `masterName` - the master name.
      Returns:
        fluent self.

    - #### setMaxNestedArrays

          public RedisSentinelConnectOptions 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 RedisSentinelConnectOptions 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

    - #### setPassword

          public RedisSentinelConnectOptions setPassword(String password)

      Description copied from class: `RedisConnectOptions`
      Set the default password for cluster/sentinel connections.
      Overrides:
        `setPassword` in class `RedisConnectOptions`
      Parameters:
        `password` - the default password
      Returns:
        fluent self

    - #### setEndpoints

          public RedisSentinelConnectOptions 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.

    - #### setConnectionString

          public RedisSentinelConnectOptions 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:
        Redis scheme on iana.org

    - #### setMaxWaitingHandlers

          public RedisSentinelConnectOptions 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.

    - #### toJson

          public JsonObject toJson()

      Converts this object to JSON notation.
      Overrides:
        `toJson` in class `RedisConnectOptions`
      Returns:
        JSON

Copyright © 2024 Eclipse. All rights reserved.