Class JedisClientConfiguration.DefaultJedisClientConfigurationBuilder
java.lang.Object
org.springframework.data.redis.connection.jedis.JedisClientConfiguration.DefaultJedisClientConfigurationBuilder
- All Implemented Interfaces:
JedisClientConfiguration.JedisClientConfigurationBuilder
,JedisClientConfiguration.JedisPoolingClientConfigurationBuilder
,JedisClientConfiguration.JedisSslClientConfigurationBuilder
- Enclosing interface:
- JedisClientConfiguration
public static class JedisClientConfiguration.DefaultJedisClientConfigurationBuilder
extends Object
implements JedisClientConfiguration.JedisClientConfigurationBuilder, JedisClientConfiguration.JedisPoolingClientConfigurationBuilder, JedisClientConfiguration.JedisSslClientConfigurationBuilder
Default
JedisClientConfiguration.JedisClientConfigurationBuilder
implementation to build an immutable
JedisClientConfiguration
.-
Method Summary
Modifier and TypeMethodDescriptionand()
build()
Build theJedisClientConfiguration
with the configuration applied from this builder.clientName
(String clientName) Configure aclientName
to be set withCLIENT SETNAME
.connectTimeout
(Duration connectTimeout) Configure a connection timeout.hostnameVerifier
(HostnameVerifier hostnameVerifier) poolConfig
(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig) readTimeout
(Duration readTimeout) Configure a read timeout.sslParameters
(SSLParameters sslParameters) sslSocketFactory
(SSLSocketFactory sslSocketFactory) Enable connection-pooling.useSsl()
Enable SSL connections.
-
Method Details
-
useSsl
Description copied from interface:JedisClientConfiguration.JedisClientConfigurationBuilder
Enable SSL connections.- Specified by:
useSsl
in interfaceJedisClientConfiguration.JedisClientConfigurationBuilder
- Returns:
JedisClientConfiguration.JedisSslClientConfigurationBuilder
.
-
sslSocketFactory
public JedisClientConfiguration.JedisSslClientConfigurationBuilder sslSocketFactory(SSLSocketFactory sslSocketFactory) - Specified by:
sslSocketFactory
in interfaceJedisClientConfiguration.JedisSslClientConfigurationBuilder
- Parameters:
sslSocketFactory
- must not be null.- Returns:
- this builder.
-
sslParameters
public JedisClientConfiguration.JedisSslClientConfigurationBuilder sslParameters(SSLParameters sslParameters) - Specified by:
sslParameters
in interfaceJedisClientConfiguration.JedisSslClientConfigurationBuilder
- Parameters:
sslParameters
- must not be null.- Returns:
- this builder.
-
hostnameVerifier
public JedisClientConfiguration.JedisSslClientConfigurationBuilder hostnameVerifier(HostnameVerifier hostnameVerifier) - Specified by:
hostnameVerifier
in interfaceJedisClientConfiguration.JedisSslClientConfigurationBuilder
- Parameters:
hostnameVerifier
- must not be null.- Returns:
- this builder.
-
usePooling
Description copied from interface:JedisClientConfiguration.JedisClientConfigurationBuilder
Enable connection-pooling.Applies only to single node Redis. Sentinel and Cluster modes use always connection-pooling regardless of the pooling setting.
- Specified by:
usePooling
in interfaceJedisClientConfiguration.JedisClientConfigurationBuilder
- Returns:
JedisClientConfiguration.JedisPoolingClientConfigurationBuilder
.
-
poolConfig
public JedisClientConfiguration.JedisPoolingClientConfigurationBuilder poolConfig(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig) - Specified by:
poolConfig
in interfaceJedisClientConfiguration.JedisPoolingClientConfigurationBuilder
- Parameters:
poolConfig
- must not be null.- Returns:
- this builder.
-
and
Description copied from interface:JedisClientConfiguration.JedisPoolingClientConfigurationBuilder
- Specified by:
and
in interfaceJedisClientConfiguration.JedisPoolingClientConfigurationBuilder
- Specified by:
and
in interfaceJedisClientConfiguration.JedisSslClientConfigurationBuilder
- Returns:
JedisClientConfiguration.JedisClientConfigurationBuilder
.
-
clientName
Description copied from interface:JedisClientConfiguration.JedisClientConfigurationBuilder
Configure aclientName
to be set withCLIENT SETNAME
.- Specified by:
clientName
in interfaceJedisClientConfiguration.JedisClientConfigurationBuilder
- Parameters:
clientName
- must not be null.- Returns:
- this builder.
-
readTimeout
Description copied from interface:JedisClientConfiguration.JedisClientConfigurationBuilder
Configure a read timeout.- Specified by:
readTimeout
in interfaceJedisClientConfiguration.JedisClientConfigurationBuilder
- Parameters:
readTimeout
- must not be null.- Returns:
- this builder.
-
connectTimeout
public JedisClientConfiguration.JedisClientConfigurationBuilder connectTimeout(Duration connectTimeout) Description copied from interface:JedisClientConfiguration.JedisClientConfigurationBuilder
Configure a connection timeout.- Specified by:
connectTimeout
in interfaceJedisClientConfiguration.JedisClientConfigurationBuilder
- Parameters:
connectTimeout
- must not be null.- Returns:
- this builder.
-
build
Description copied from interface:JedisClientConfiguration.JedisClientConfigurationBuilder
Build theJedisClientConfiguration
with the configuration applied from this builder.- Specified by:
build
in interfaceJedisClientConfiguration.JedisClientConfigurationBuilder
- Specified by:
build
in interfaceJedisClientConfiguration.JedisPoolingClientConfigurationBuilder
- Specified by:
build
in interfaceJedisClientConfiguration.JedisSslClientConfigurationBuilder
- Returns:
- a new
JedisClientConfiguration
object.
-