public class RedisOptions extends Object
Constructor and Description |
---|
RedisOptions()
Creates a default configuration object using redis server defaults
|
RedisOptions(io.vertx.core.json.JsonObject json)
Copy from JSON constructor.
|
RedisOptions(RedisOptions other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
RedisOptions |
addEndpoint(io.vertx.core.net.SocketAddress endpoint)
Adds a endpoint to use while connecting to the redis server.
|
io.vertx.core.net.SocketAddress |
getEndpoint()
Gets the redis endpoint to use
|
List<io.vertx.core.net.SocketAddress> |
getEndpoints()
Gets the list of redis endpoints to use (mostly used while connecting to a cluster)
|
String |
getMasterName()
Get the master name (only considered in HA mode).
|
int |
getMaxNestedArrays()
Tune how much nested arrays are allowed on a redis response.
|
int |
getMaxWaitingHandlers()
The client will always work on pipeline mode, this means that messages can start queueing.
|
io.vertx.core.net.NetClientOptions |
getNetClientOptions()
Get the net client options used to connect to the server.
|
String |
getPassword()
Get the provided password to be used when establishing a connection to the server.
|
RedisRole |
getRole()
Get the role name (only considered in HA mode).
|
Integer |
getSelect()
Get the provided database to be selected when establishing a connection to the server.
|
RedisClientType |
getType()
Get the type of client to be created.
|
RedisSlaves |
getUseSlave()
Get whether or not to use slave nodes (only considered in Cluster mode).
|
RedisOptions |
setEndpoint(io.vertx.core.net.SocketAddress endpoint)
Sets a single endpoint to use while connecting to the redis server.
|
RedisOptions |
setEndpoints(List<io.vertx.core.net.SocketAddress> endpoints)
Set the endpoints to use while connecting to the redis server.
|
RedisOptions |
setMasterName(String masterName)
Set the master name (only considered in HA mode).
|
RedisOptions |
setMaxNestedArrays(int maxNestedArrays)
Tune how much nested arrays are allowed on a redis response.
|
RedisOptions |
setMaxWaitingHandlers(int maxWaitingHandlers)
The client will always work on pipeline mode, this means that messages can start queueing.
|
RedisOptions |
setNetClientOptions(io.vertx.core.net.NetClientOptions netClientOptions)
Set the net client options to be used while connecting to the redis server.
|
RedisOptions |
setPassword(String password)
Set the provided password to be used when establishing a connection to the server.
|
RedisOptions |
setRole(RedisRole role)
Set the role name (only considered in HA mode).
|
RedisOptions |
setSelect(Integer select)
Set the provided database to be selected when establishing a connection to the server.
|
RedisOptions |
setType(RedisClientType type)
Set the desired client type to be created.
|
RedisOptions |
setUseSlave(RedisSlaves slaves)
Set whether or not to use slave nodes (only considered in Cluster mode).
|
io.vertx.core.json.JsonObject |
toJson()
Converts this object to JSON notation.
|
public RedisOptions()
public RedisOptions(RedisOptions other)
other
- the object to clone.public RedisOptions(io.vertx.core.json.JsonObject json)
json
- source jsonpublic RedisClientType getType()
public RedisOptions setType(RedisClientType type)
type
- the client type.public io.vertx.core.net.NetClientOptions getNetClientOptions()
public RedisOptions setNetClientOptions(io.vertx.core.net.NetClientOptions netClientOptions)
netClientOptions
- custom net client options.public List<io.vertx.core.net.SocketAddress> getEndpoints()
public io.vertx.core.net.SocketAddress getEndpoint()
public RedisOptions setEndpoints(List<io.vertx.core.net.SocketAddress> endpoints)
endpoints
- list of socket addresses.public RedisOptions addEndpoint(io.vertx.core.net.SocketAddress endpoint)
endpoint
- a socket addresses.public RedisOptions setEndpoint(io.vertx.core.net.SocketAddress endpoint)
endpoint
- a socket addresses.public int getMaxWaitingHandlers()
public RedisOptions setMaxWaitingHandlers(int maxWaitingHandlers)
maxWaitingHandlers
- max allowed queued waiting handlers.public String getMasterName()
public RedisOptions setMasterName(String masterName)
masterName
- the master name.public RedisRole getRole()
public RedisOptions setRole(RedisRole role)
role
- the master name.public RedisSlaves getUseSlave()
public RedisOptions setUseSlave(RedisSlaves slaves)
slaves
- the cluster slave mode.public int getMaxNestedArrays()
public RedisOptions setMaxNestedArrays(int maxNestedArrays)
maxNestedArrays
- the configured max nested arrays allowance.public String getPassword()
public RedisOptions setPassword(String password)
password
- the passwordpublic Integer getSelect()
public RedisOptions setSelect(Integer select)
select
- the database id.public io.vertx.core.json.JsonObject toJson()
Copyright © 2020 Eclipse. All rights reserved.