| Modifier and Type | Method and Description |
|---|---|
RedisURI |
build() |
static RedisURI.Builder |
redis(String host)
Set Redis host.
|
static RedisURI.Builder |
redis(String host,
int port)
Set Redis host and port.
|
static RedisURI.Builder |
sentinel(String host)
Set Sentinel host.
|
static RedisURI.Builder |
sentinel(String host,
int port)
Set Sentinel host and port.
|
static RedisURI.Builder |
sentinel(String host,
int port,
String masterId)
Set Sentinel host, port and master id.
|
static RedisURI.Builder |
sentinel(String host,
String masterId)
Set Sentinel host and master id.
|
static RedisURI.Builder |
socket(String socket)
Set Redis socket.
|
RedisURI.Builder |
withClientName(String clientName)
Configures a client name.
|
RedisURI.Builder |
withDatabase(int database)
Configures the database number.
|
RedisURI.Builder |
withHost(String host)
Adds host information to the builder.
|
RedisURI.Builder |
withPassword(char[] password)
Configures authentication.
|
RedisURI.Builder |
withPassword(String password)
Configures authentication.
|
RedisURI.Builder |
withPort(int port)
Adds port information to the builder.
|
RedisURI.Builder |
withSentinel(String host)
Add a withSentinel host to the existing builder.
|
RedisURI.Builder |
withSentinel(String host,
int port)
Add a withSentinel host/port to the existing builder.
|
RedisURI.Builder |
withSentinelMasterId(String sentinelMasterId)
Configures a sentinel master Id.
|
RedisURI.Builder |
withSsl(boolean ssl)
Adds ssl information to the builder.
|
RedisURI.Builder |
withStartTls(boolean startTls)
Enables/disables StartTLS when using SSL.
|
RedisURI.Builder |
withTimeout(Duration timeout)
Configures a timeout.
|
RedisURI.Builder |
withTimeout(long timeout,
TimeUnit unit)
Deprecated.
since 5.0, use
withTimeout(Duration). |
RedisURI.Builder |
withVerifyPeer(boolean verifyPeer)
Enables/disables peer verification.
|
public static RedisURI.Builder socket(String socket)
socket - the host namepublic static RedisURI.Builder redis(String host)
host - the host namepublic static RedisURI.Builder redis(String host, int port)
host - the host nameport - the portpublic static RedisURI.Builder sentinel(String host)
host - the host namepublic static RedisURI.Builder sentinel(String host, int port)
host - the host nameport - the portpublic static RedisURI.Builder sentinel(String host, String masterId)
host - the host namemasterId - sentinel master idpublic static RedisURI.Builder sentinel(String host, int port, String masterId)
host - the host nameport - the portmasterId - sentinel master idpublic RedisURI.Builder withSentinel(String host)
host - the host namepublic RedisURI.Builder withSentinel(String host, int port)
host - the host nameport - the portpublic RedisURI.Builder withHost(String host)
host - the portpublic RedisURI.Builder withPort(int port)
port - the portpublic RedisURI.Builder withSsl(boolean ssl)
ssl - true if use SSLpublic RedisURI.Builder withStartTls(boolean startTls)
startTls - true if use StartTLSpublic RedisURI.Builder withVerifyPeer(boolean verifyPeer)
verifyPeer - true to verify hosts when using SSLpublic RedisURI.Builder withDatabase(int database)
database - the database numberpublic RedisURI.Builder withClientName(String clientName)
clientName - the client namepublic RedisURI.Builder withPassword(String password)
password - the passwordpublic RedisURI.Builder withPassword(char[] password)
password - the passwordpublic RedisURI.Builder withTimeout(Duration timeout)
timeout - must not be null or negative.@Deprecated public RedisURI.Builder withTimeout(long timeout, TimeUnit unit)
withTimeout(Duration).timeout - must be greater or equal 0.unit - the timeout time unit.public RedisURI.Builder withSentinelMasterId(String sentinelMasterId)
sentinelMasterId - sentinel master id, must not be empty or nullpublic RedisURI build()
Copyright © 2019 lettuce.io. All rights reserved.