Constructor and Description |
---|
Builder() |
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 |
withDatabase(int database)
Adds database selection.
|
RedisURI.Builder |
withPassword(String password)
Adds 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)
Adds 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(long timeout,
TimeUnit unit)
Adds timeout.
|
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 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 withPassword(String password)
password
- the passwordpublic RedisURI.Builder withTimeout(long timeout, TimeUnit unit)
timeout
- must be greater or equal 0"unit
- the timeout time unit.public RedisURI.Builder withSentinelMasterId(String sentinelMasterId)
sentinelMasterId
- sentinel master idpublic RedisURI build()
Copyright © 2016. All rights reserved.