io.vertx.redis

## Class RedisOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.ClientOptionsBase
      - - io.vertx.core.net.NetClientOptions
        - - io.vertx.redis.RedisOptions

- Deprecated.
  Use `RedisOptions` with the new client API. This object controls the connection setting to the Redis Server. There is no need to specify most of the settings since it has built the following sensible defaults:

  * `encoding`: `UTF-8` * `host`: `localhost` * `port`: 6379 * `tcpKeepAlive`: true * `tcpNoDelay`: true * `binary`: false

  However there are two extra properties that have no defaults since they are optional:

  * `auth` * `select`

  The usage of this two extra properties is to setup required authentication and optionally the selection of the active database at connection time. If you define this extra properties on every connection to Redis server this client will perform the authentication handshake and database selection, however if you don't do this and call `RedisClient.auth(String, Handler)` yourself in case of connection failure the client will not be able to perform the correct authentication handshake.

      @Deprecated
      public class RedisOptions
      extends NetClientOptions

- - ### Field Summary

    - ### Fields inherited from class io.vertx.core.net.NetClientOptions

      `DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL`

    - ### Fields inherited from class io.vertx.core.net.ClientOptionsBase

      `DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL`

    - ### Fields inherited from class io.vertx.core.net.TCPSSLOptions

      `DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS`

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RedisOptions()` Deprecated.
    `RedisOptions(JsonObject json)` Deprecated.
    `RedisOptions(RedisOptions other)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `RedisOptions` | `addSentinel(String sentinelHostAndPort)` Deprecated. Add Sentinel node.
    `String` | `getAddress()` Deprecated. Get the default `PUB/SUB` eventbus address prefix, default `io.vertx.redis`.
    `String` | `getAuth()` Deprecated. Get the password for authentication at connection time.
    `String` | `getDomainSocketAddress()` Deprecated. Get the domain socket address for the Redis server.
    `String` | `getEncoding()` Deprecated. Return the character encoding for Strings, default `UTF-8`.
    `String` | `getHost()` Deprecated. Get the host name for the Redis server, default `localhost`.
    `String` | `getMasterName()` Deprecated. Get name of Redis master.
    `int` | `getPort()` Deprecated. Get the tcp port where the Redis server is listening, default 6379.
    `Integer` | `getSelect()` Deprecated. Get the database to select at connection time.
    `List<String>` | `getSentinels()` Deprecated. Get list of Sentinels.
    `boolean` | `isBinary()` Deprecated. Return if the messages to/from redis are binary, default `false`.
    `boolean` | `isDomainSocket()` Deprecated. Get the domain socket enabled option, default `false`.
    `RedisOptions` | `setAddress(String address)` Deprecated. Set the eventbus address prefix for `PUB/SUB`.
    `RedisOptions` | `setAuth(String auth)` Deprecated. Set the password for authentication at connection time.
    `RedisOptions` | `setBinary(boolean binary)` Deprecated. Set the messages to/from redis as binary, default `false`.
    `RedisOptions` | `setDomainSocket(boolean domainSocket)` Deprecated. Set the domain socket enabled option, default `false`.
    `RedisOptions` | `setDomainSocketAddress(String domainSocketAddress)` Deprecated. Set the domain socket address where the Redis server is listening.
    `RedisOptions` | `setEncoding(String encoding)` Deprecated. Set the user defined character encoding, e.g.: `iso-8859-1`.
    `RedisOptions` | `setHost(String host)` Deprecated. Set the host name where the Redis server is listening.
    `RedisOptions` | `setMasterName(String masterName)` Deprecated. Set name of Redis master (used with Sentinel).
    `RedisOptions` | `setPort(int port)` Deprecated. Set the tcp port where the Redis server is listening.
    `RedisOptions` | `setSelect(Integer select)` Deprecated. Set the database to select at connection time.
    `RedisOptions` | `setSentinels(List<String> sentinels)` Deprecated. Set the list of Sentinels.

    - ### Methods inherited from class io.vertx.core.net.NetClientOptions

      `addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, equals, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, hashCode, removeEnabledSecureTransportProtocol, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setKeyCertOptions, setKeyStoreOptions, setLocalAddress, setLogActivity, setMetricsName, setOpenSslEngineOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setProxyOptions, setReceiveBufferSize, setReconnectAttempts, setReconnectInterval, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSsl, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustAll, setTrustOptions, setTrustStoreOptions, setUseAlpn, setUsePooledBuffers`

    - ### Methods inherited from class io.vertx.core.net.ClientOptionsBase

      `getConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAll, toJson`

    - ### Methods inherited from class io.vertx.core.net.TCPSSLOptions

      `getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffers`

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort`

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

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

- - ### Constructor Detail

    - #### RedisOptions

          public RedisOptions()

      Deprecated.

    - #### RedisOptions

          public RedisOptions(RedisOptions other)

      Deprecated.

    - #### RedisOptions

          public RedisOptions(JsonObject json)

      Deprecated.

  - ### Method Detail

    - #### getEncoding

          public String getEncoding()

      Deprecated.
      Return the character encoding for Strings, default `UTF-8`. * @return character encoding

    - #### setEncoding

          public RedisOptions setEncoding(String encoding)

      Deprecated.
      Set the user defined character encoding, e.g.: `iso-8859-1`. * @param encoding the user character encoding
      Returns:
        self

    - #### isBinary

          public boolean isBinary()

      Deprecated.
      Return if the messages to/from redis are binary, default `false`. * @return are messages binary

    - #### setBinary

          public RedisOptions setBinary(boolean binary)

      Deprecated.
      Set the messages to/from redis as binary, default `false`. * @param binary use binary messages
      Returns:
        self

    - #### getAddress

          public String getAddress()

      Deprecated.
      Get the default `PUB/SUB` eventbus address prefix, default `io.vertx.redis`. * @return eventbus address prefix

    - #### setAddress

          public RedisOptions setAddress(String address)

      Deprecated.
      Set the eventbus address prefix for `PUB/SUB`. * @param address address prefix.
      Returns:
        self

    - #### getHost

          public String getHost()

      Deprecated.
      Get the host name for the Redis server, default `localhost`. * @return host name.

    - #### setHost

          public RedisOptions setHost(String host)

      Deprecated.
      Set the host name where the Redis server is listening. * @param host host name
      Returns:
        self

    - #### getPort

          public int getPort()

      Deprecated.
      Get the tcp port where the Redis server is listening, default 6379. * @return tcp port

    - #### setPort

          public RedisOptions setPort(int port)

      Deprecated.
      Set the tcp port where the Redis server is listening.
      Parameters:
        `port` - tcp port.
      Returns:
        self

    - #### getAuth

          public String getAuth()

      Deprecated.
      Get the password for authentication at connection time. * @return password

    - #### setAuth

          public RedisOptions setAuth(String auth)

      Deprecated.
      Set the password for authentication at connection time.
      Parameters:
        `auth` - password
      Returns:
        self

    - #### getSelect

          public Integer getSelect()

      Deprecated.
      Get the database to select at connection time. * @return database id

    - #### setSelect

          public RedisOptions setSelect(Integer select)

      Deprecated.
      Set the database to select at connection time. * @param select database id
      Returns:
        self

    - #### getMasterName

          public String getMasterName()

      Deprecated.
      Get name of Redis master.
      Returns:
        Redis master name

    - #### setMasterName

          public RedisOptions setMasterName(String masterName)

      Deprecated.
      Set name of Redis master (used with Sentinel).
      Parameters:
        `masterName` - name of Redis master
      Returns:
        self

    - #### addSentinel

          public RedisOptions addSentinel(String sentinelHostAndPort)

      Deprecated.
      Add Sentinel node.
      Parameters:
        `sentinelHostAndPort` - Sentinel node on the form 'hostname:port'
      Returns:
        self

    - #### getSentinels

          public List<String> getSentinels()

      Deprecated.
      Get list of Sentinels.
      Returns:
        List of Sentinels on the form 'hostname:port'

    - #### setSentinels

          public RedisOptions setSentinels(List<String> sentinels)

      Deprecated.
      Set the list of Sentinels.
      Parameters:
        `sentinels` - a list of sentinels host and port string
      Returns:
        self

    - #### setDomainSocketAddress

          public RedisOptions setDomainSocketAddress(String domainSocketAddress)

      Deprecated.
      Set the domain socket address where the Redis server is listening.
      Parameters:
        `domainSocketAddress` - * @return self

    - #### getDomainSocketAddress

          public String getDomainSocketAddress()

      Deprecated.
      Get the domain socket address for the Redis server.
      Returns:
        domain socket address

    - #### setDomainSocket

          public RedisOptions setDomainSocket(boolean domainSocket)

      Deprecated.
      Set the domain socket enabled option, default `false`.
      Parameters:
        `domainSocket` - * @return self

    - #### isDomainSocket

          public boolean isDomainSocket()

      Deprecated.
      Get the domain socket enabled option, default `false`. * @return domain socket enabled option

Copyright © 2021 Eclipse. All rights reserved.