public interface JedisClientConfig
| Modifier and Type | Method and Description |
|---|---|
default AuthXManager |
getAuthXManager() |
default int |
getBlockingSocketTimeoutMillis() |
default java.lang.String |
getClientName() |
default ClientSetInfoConfig |
getClientSetInfoConfig()
Modify the behavior of internally executing CLIENT SETINFO command.
|
default CommandKeyArgumentPreProcessor |
getCommandKeyArgumentPreProcessor()
Optional key argument pre-processor applied to every command before it is sent.
|
default int |
getConnectionTimeoutMillis() |
default java.util.function.Supplier<RedisCredentials> |
getCredentialsProvider() |
default int |
getDatabase() |
default HostAndPortMapper |
getHostAndPortMapper() |
default javax.net.ssl.HostnameVerifier |
getHostnameVerifier() |
default JsonObjectMapper |
getJsonObjectMapper()
Optional JSON object mapper used by RedisJSON commands.
|
default java.lang.String |
getPassword() |
default RedisProtocol |
getRedisProtocol() |
default int |
getSearchDialect()
Default search dialect applied to RediSearch commands when the caller does not specify one.
|
default int |
getSocketTimeoutMillis() |
default SslOptions |
getSslOptions()
TLS/SSL configuration.
|
default javax.net.ssl.SSLParameters |
getSslParameters()
Deprecated.
since 7.4.2, use
getSslOptions() instead. |
default javax.net.ssl.SSLSocketFactory |
getSslSocketFactory()
Deprecated.
since 7.4.2, use
getSslOptions() instead. |
default java.lang.String |
getUser() |
default boolean |
isAutoNegotiateProtocol()
Whether the client should auto-negotiate the highest RESP protocol available with the server
when no protocol is explicitly requested.
|
default boolean |
isReadOnlyForRedisClusterReplicas()
Execute READONLY command to connections.
|
default boolean |
isSsl()
Whether TLS/SSL should be used for connections.
|
default RedisProtocol getRedisProtocol()
default boolean isAutoNegotiateProtocol()
When this returns true and getRedisProtocol() is null, the client
sends HELLO 3 on connect and gracefully falls back to RESP2 if the server does not
support RESP3. When false and the protocol is null, the client preserves the
legacy behaviour of skipping HELLO entirely and assuming RESP2 on the wire.
When getRedisProtocol() is non-null, this flag is ignored — the requested
protocol is enforced strictly.
The legacy Jedis class does not support RESP3 wire format, so it ignores this flag and
emits a warning when callers leave it enabled.
true to auto-negotiate the protocol (default), false to preserve legacy
HELLO-less behaviourdefault int getConnectionTimeoutMillis()
default int getSocketTimeoutMillis()
default int getBlockingSocketTimeoutMillis()
default java.lang.String getUser()
default java.lang.String getPassword()
default java.util.function.Supplier<RedisCredentials> getCredentialsProvider()
default AuthXManager getAuthXManager()
default int getDatabase()
default java.lang.String getClientName()
default boolean isSsl()
A TLS connection is established when this returns true or when getSslOptions()
returns a non-null value. If both are provided, getSslOptions() takes
precedence.
true if TLS/SSL is enabled, false otherwisegetSslOptions()@Deprecated default javax.net.ssl.SSLSocketFactory getSslSocketFactory()
getSslOptions() instead.SSLSocketFactory to use for TLS connections.
Consulted only when getSslOptions() returns null. Implementations should
return null to use the JVM default.
null to use the defaultgetSslOptions()@Deprecated default javax.net.ssl.SSLParameters getSslParameters()
getSslOptions() instead.SSLParameters to apply to TLS sockets.
Consulted only when getSslOptions() returns null. Implementations should
return null to let the client apply defaults (which enable HTTPS hostname
verification).
null for defaultsgetSslOptions()default SslOptions getSslOptions()
When non-null, TLS is enabled and this takes precedence over
getSslSocketFactory() and getSslParameters(). Implementations should return
null to fall back to isSsl() / getSslSocketFactory() /
getSslParameters().
null if not configuredSslOptions,
SslVerifyModedefault javax.net.ssl.HostnameVerifier getHostnameVerifier()
default HostAndPortMapper getHostAndPortMapper()
default boolean isReadOnlyForRedisClusterReplicas()
READONLY command is specific to Redis Cluster replica nodes. So this config param is only intended for Redis Cluster connections.
true - to execute READONLY command to connection(s). false - otherwise.default ClientSetInfoConfig getClientSetInfoConfig()
default CommandKeyArgumentPreProcessor getCommandKeyArgumentPreProcessor()
null disables key rewriting.
Not supported by the legacy Jedis class — only the UnifiedJedis family
(RedisClient, RedisClusterClient, RedisSentinelClient,
MultiDbClient) honours this value.
default JsonObjectMapper getJsonObjectMapper()
null falls back to
the library default (Gson-based).
Not supported by the legacy Jedis class — only the UnifiedJedis family
(RedisClient, RedisClusterClient, RedisSentinelClient,
MultiDbClient) honours this value.
default int getSearchDialect()
SearchProtocol.DEFAULT_DIALECT.
Not supported by the legacy Jedis class — only the UnifiedJedis family
(RedisClient, RedisClusterClient, RedisSentinelClient,
MultiDbClient) honours this value.
Copyright © 2026. All rights reserved.