public class RedisOptions extends Object
RedisClient.auth(String, Handler)
yourself in case of connection failure the client will not be able to perform the correct authentication handshake.Constructor and Description |
---|
RedisOptions() |
RedisOptions(JsonObject json) |
RedisOptions(RedisOptions options) |
Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Get the default `PUB/SUB` eventbus address prefix, default `io.vertx.redis`.
|
String |
getAuth()
Get the password for authentication at connection time.
|
String |
getEncoding()
Return the character encoding for Strings, default `UTF-8`.
|
String |
getHost()
Get the host name for the Redis server, default `localhost`.
|
int |
getPort()
Get the tcp port where the Redis server is listening, default 6379.
|
Integer |
getSelect()
Get the database to select at connection time.
|
boolean |
isTcpKeepAlive()
Get wheather TCP KeepAlive option should be enabled, default true.
|
boolean |
isTcpNoDelay()
Get wheather TCP NoDelay should be enabled, default true
|
RedisOptions |
setAddress(String address)
Set the eventbus address prefix for `PUB/SUB`.
|
RedisOptions |
setAuth(String auth)
Set the password for authentication at connection time.
|
RedisOptions |
setEncoding(String encoding)
Set the user defined character encoding, e.g.: `iso-8859-1`.
|
RedisOptions |
setHost(String host)
Set the host name where the Redis server is listening.
|
RedisOptions |
setPort(int port)
Set the tcp port where the Redis server is listening.
|
RedisOptions |
setSelect(Integer select)
Set the database to select at connection time.
|
RedisOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set the TCP KeepAlive option
|
RedisOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set the TCP NoDelay at the socket level.
|
JsonObject |
toJSON() |
public RedisOptions()
public RedisOptions(JsonObject json)
public RedisOptions(RedisOptions options)
public String getEncoding()
public RedisOptions setEncoding(String encoding)
encoding
- the user character encodingpublic String getAddress()
public RedisOptions setAddress(String address)
address
- address prefix.public String getHost()
public RedisOptions setHost(String host)
host
- host namepublic int getPort()
public RedisOptions setPort(int port)
port
- tcp port.public boolean isTcpKeepAlive()
public RedisOptions setTcpKeepAlive(boolean tcpKeepAlive)
tcpKeepAlive
- booleanpublic boolean isTcpNoDelay()
public RedisOptions setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- booleanpublic String getAuth()
public RedisOptions setAuth(String auth)
auth
- passwordpublic Integer getSelect()
public RedisOptions setSelect(Integer select)
select
- database idpublic JsonObject toJSON()
Copyright © 2016. All rights reserved.