public class RedisSocketConfiguration extends Object implements RedisConfiguration, RedisConfiguration.DomainSocketConfiguration
RedisConnection via RedisConnectionFactory connecting to
single Redis using a local unix domain socket.RedisConfiguration.ClusterConfiguration, RedisConfiguration.DomainSocketConfiguration, RedisConfiguration.SentinelConfiguration, RedisConfiguration.StaticMasterReplicaConfiguration, RedisConfiguration.WithAuthentication, RedisConfiguration.WithDatabaseIndex, RedisConfiguration.WithDomainSocket, RedisConfiguration.WithHostAndPort, RedisConfiguration.WithPassword| Constructor and Description |
|---|
RedisSocketConfiguration()
Create a new default
RedisSocketConfiguration. |
RedisSocketConfiguration(String socket)
Create a new
RedisSocketConfiguration given socket. |
| Modifier and Type | Method and Description |
|---|---|
int |
getDatabase()
Get the database index to use.
|
RedisPassword |
getPassword()
Get the RedisPassword to use when connecting.
|
String |
getSocket()
Get the domain socket.
|
String |
getUsername()
Get the username to use when connecting.
|
void |
setDatabase(int index)
Set the database index to use.
|
void |
setPassword(RedisPassword password)
Create and set a
RedisPassword for given String. |
void |
setSocket(String socket)
Set the socket.
|
void |
setUsername(String username)
Create and set a username with the given
String. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDatabaseOrElse, getDatabaseOrElse, getHostOrElse, getPasswordOrElse, getPasswordOrElse, getPortOrElse, getUsernameOrElse, isAuthenticationAware, isClusterConfiguration, isDatabaseIndexAware, isDomainSocketConfiguration, isHostAndPortAware, isSentinelConfiguration, isStaticMasterReplicaConfigurationsetPassword, setPasswordpublic RedisSocketConfiguration()
RedisSocketConfiguration.public RedisSocketConfiguration(String socket)
RedisSocketConfiguration given socket.socket - must not be null or empty.public String getSocket()
RedisConfiguration.WithDomainSocketgetSocket in interface RedisConfiguration.WithDomainSocketpublic void setSocket(String socket)
RedisConfiguration.WithDomainSocketsetSocket in interface RedisConfiguration.WithDomainSocketsocket - path to the Redis socket. Must not be null.public int getDatabase()
RedisConfiguration.WithDatabaseIndexgetDatabase in interface RedisConfiguration.WithDatabaseIndexzero by default.public void setDatabase(int index)
RedisConfiguration.WithDatabaseIndexsetDatabase in interface RedisConfiguration.WithDatabaseIndexpublic void setUsername(@Nullable String username)
RedisConfiguration.WithAuthenticationString. Requires Redis 6 or newer.setUsername in interface RedisConfiguration.WithAuthenticationusername - the username.@Nullable public String getUsername()
RedisConfiguration.WithAuthenticationgetUsername in interface RedisConfiguration.WithAuthenticationpublic RedisPassword getPassword()
RedisConfiguration.WithAuthenticationgetPassword in interface RedisConfiguration.WithAuthenticationRedisPassword.none() if none set.public void setPassword(RedisPassword password)
RedisConfiguration.WithAuthenticationRedisPassword for given String.setPassword in interface RedisConfiguration.WithAuthenticationpassword - must not be null use RedisPassword.none() instead.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.