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
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
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_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS
DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
Constructor and Description |
---|
RedisOptions()
Deprecated.
|
RedisOptions(JsonObject json)
Deprecated.
|
RedisOptions(RedisOptions other)
Deprecated.
|
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.
|
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
getConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAll, setTcpUserTimeout, toJson
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffers
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public RedisOptions()
public RedisOptions(RedisOptions other)
public RedisOptions(JsonObject json)
public String getEncoding()
public RedisOptions setEncoding(String encoding)
public boolean isBinary()
public RedisOptions setBinary(boolean binary)
public String getAddress()
public RedisOptions setAddress(String address)
public String getHost()
public RedisOptions setHost(String host)
public int getPort()
public RedisOptions setPort(int port)
port
- tcp port.public String getAuth()
public RedisOptions setAuth(String auth)
auth
- passwordpublic Integer getSelect()
public RedisOptions setSelect(Integer select)
public String getMasterName()
public RedisOptions setMasterName(String masterName)
masterName
- name of Redis masterpublic RedisOptions addSentinel(String sentinelHostAndPort)
sentinelHostAndPort
- Sentinel node on the form 'hostname:port'public List<String> getSentinels()
public RedisOptions setSentinels(List<String> sentinels)
sentinels
- a list of sentinels host and port stringpublic RedisOptions setDomainSocketAddress(String domainSocketAddress)
domainSocketAddress
- * @return selfpublic String getDomainSocketAddress()
public RedisOptions setDomainSocket(boolean domainSocket)
domainSocket
- * @return selfpublic boolean isDomainSocket()
Copyright © 2023 Eclipse. All rights reserved.