Interface JedisClientConfiguration.JedisClientConfigurationBuilder
- All Known Implementing Classes:
JedisClientConfiguration.DefaultJedisClientConfigurationBuilder
- Enclosing interface:
- JedisClientConfiguration
public static interface JedisClientConfiguration.JedisClientConfigurationBuilder
Builder for
JedisClientConfiguration
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
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.customize
(JedisClientConfigBuilderCustomizer customizer) Configure aJedisClientConfigBuilderCustomizer
to configureJedisClientConfig
.readTimeout
(Duration readTimeout) Configure a read timeout.Enable connection-pooling.useSsl()
Enable SSL connections.
-
Method Details
-
customize
JedisClientConfiguration.JedisClientConfigurationBuilder customize(JedisClientConfigBuilderCustomizer customizer) Configure aJedisClientConfigBuilderCustomizer
to configureJedisClientConfig
.- Returns:
JedisClientConfiguration.JedisClientConfigurationBuilder
.- Since:
- 3.4
-
useSsl
Enable SSL connections. -
usePooling
Enable connection-pooling.Applies only to single node Redis. Sentinel and Cluster modes use always connection-pooling regardless of the pooling setting.
-
clientName
Configure aclientName
to be set withCLIENT SETNAME
.- Parameters:
clientName
- must not be null.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- if clientName is null.
-
readTimeout
Configure a read timeout.- Parameters:
readTimeout
- must not be null.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- if readTimeout is null.
-
connectTimeout
Configure a connection timeout.- Parameters:
connectTimeout
- must not be null.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- if connectTimeout is null.
-
build
JedisClientConfiguration build()Build theJedisClientConfiguration
with the configuration applied from this builder.- Returns:
- a new
JedisClientConfiguration
object.
-