Interface JedisClientConfiguration
public interface JedisClientConfiguration
Redis client configuration for jedis. This configuration provides optional configuration elements such as
SSLSocketFactory
and JedisPoolConfig
specific to jedis client features.
Providing optional elements allows a more specific configuration of the client:
- Whether to use SSL
- Optional
SSLSocketFactory
- Optional
SSLParameters
- Optional
HostnameVerifier
- Whether to use connection-pooling
- Optional
GenericObjectPoolConfig
- Optional client name
- Connect
timeout
- Read
timeout
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl, Chao Chang
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
DefaultJedisClientConfiguration.JedisClientConfigurationBuilder
implementation to build an immutableJedisClientConfiguration
.static interface
Builder forJedisClientConfiguration
.static interface
Builder for Pooling-relatedJedisClientConfiguration
.static interface
Builder for SSL-relatedJedisClientConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a newJedisClientConfiguration.JedisClientConfigurationBuilder
to buildJedisClientConfiguration
to be used with the jedis client.static JedisClientConfiguration
Creates a defaultJedisClientConfiguration
.Optional<org.apache.commons.pool2.impl.GenericObjectPoolConfig>
boolean
boolean
isUseSsl()
-
Method Details
-
getCustomizer
Optional<JedisClientConfigBuilderCustomizer> getCustomizer()- Returns:
- the optional
JedisClientConfigBuilderCustomizer
. - Since:
- 3.4
-
isUseSsl
boolean isUseSsl()- Returns:
- true to use SSL, false to use unencrypted connections.
-
getSslSocketFactory
Optional<SSLSocketFactory> getSslSocketFactory()- Returns:
- the optional
SSLSocketFactory
.
-
getSslParameters
Optional<SSLParameters> getSslParameters()- Returns:
- the optional
SSLParameters
.
-
getHostnameVerifier
Optional<HostnameVerifier> getHostnameVerifier()- Returns:
- the optional
HostnameVerifier
.
-
isUsePooling
boolean isUsePooling()- Returns:
- true to use connection-pooling. Applies only to single node Redis. Sentinel and Cluster modes use always connection-pooling regardless of the pooling setting.
-
getPoolConfig
Optional<org.apache.commons.pool2.impl.GenericObjectPoolConfig> getPoolConfig()- Returns:
- the optional
GenericObjectPoolConfig
.
-
getClientName
- Returns:
- the optional client name to be set with
CLIENT SETNAME
.
-
getConnectTimeout
Duration getConnectTimeout()- Returns:
- the connection timeout.
- See Also:
-
getReadTimeout
Duration getReadTimeout()- Returns:
- the read timeout.
- See Also:
-
builder
Creates a newJedisClientConfiguration.JedisClientConfigurationBuilder
to buildJedisClientConfiguration
to be used with the jedis client.- Returns:
- a new
JedisClientConfiguration.JedisClientConfigurationBuilder
to buildJedisClientConfiguration
.
-
defaultConfiguration
Creates a defaultJedisClientConfiguration
.- Customizer
- none
- SSL enabled
- no
- Pooling enabled
- no
- Client Name
- [not set]
- Read Timeout
- 2000 msec
- Connect Timeout
- 2000 msec
- Returns:
- a
JedisClientConfiguration
with defaults.
-