public static class DefaultJedisClientConfig.Builder
extends java.lang.Object
public DefaultJedisClientConfig build()
public DefaultJedisClientConfig.Builder resp3()
protocol(RedisProtocol) with
RedisProtocol.RESP3.public DefaultJedisClientConfig.Builder resp2()
protocol(RedisProtocol) with
RedisProtocol.RESP2.public DefaultJedisClientConfig.Builder serverDefaultProtocol()
protocol(null) and disables
auto-negotiation so the connection skips the HELLO handshake entirely and assumes
RESP2 on the wire.public DefaultJedisClientConfig.Builder protocol(RedisProtocol protocol)
public DefaultJedisClientConfig.Builder autoNegotiateProtocol(boolean autoNegotiateProtocol)
null, controls
whether the connection attempts HELLO 3 with graceful RESP2 fallback (when
true, the default) or skips HELLO altogether (when false, the legacy
behaviour).autoNegotiateProtocol - whether to auto-negotiate the protocol on connectpublic DefaultJedisClientConfig.Builder timeoutMillis(int timeoutMillis)
public DefaultJedisClientConfig.Builder connectionTimeoutMillis(int connectionTimeoutMillis)
public DefaultJedisClientConfig.Builder socketTimeoutMillis(int socketTimeoutMillis)
public DefaultJedisClientConfig.Builder blockingSocketTimeoutMillis(int blockingSocketTimeoutMillis)
public DefaultJedisClientConfig.Builder user(java.lang.String user)
public DefaultJedisClientConfig.Builder password(java.lang.String password)
public DefaultJedisClientConfig.Builder credentials(RedisCredentials credentials)
public DefaultJedisClientConfig.Builder credentialsProvider(java.util.function.Supplier<RedisCredentials> credentials)
public DefaultJedisClientConfig.Builder database(int database)
public DefaultJedisClientConfig.Builder clientName(java.lang.String clientName)
@Deprecated public DefaultJedisClientConfig.Builder ssl(boolean ssl)
sslOptions(SslOptions) instead. For TLS with JVM
defaults use sslOptions(SslOptions.defaults()).
TLS is enabled when either ssl(true) or sslOptions(SslOptions) is set.
sslOptions(SslOptions) takes precedence; otherwise TLS uses
sslSocketFactory(SSLSocketFactory) and sslParameters(SSLParameters).
ssl - true to enable TLS/SSLthis@Deprecated public DefaultJedisClientConfig.Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sslSocketFactory)
sslOptions(SslOptions) instead.@Deprecated public DefaultJedisClientConfig.Builder sslParameters(javax.net.ssl.SSLParameters sslParameters)
sslOptions(SslOptions) instead.public DefaultJedisClientConfig.Builder sslOptions(SslOptions sslOptions)
When set, TLS is enabled and sslSocketFactory(SSLSocketFactory) /
sslParameters(SSLParameters) are ignored.
sslOptions - TLS configurationthisSslOptionspublic DefaultJedisClientConfig.Builder hostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)
public DefaultJedisClientConfig.Builder hostAndPortMapper(HostAndPortMapper hostAndPortMapper)
public DefaultJedisClientConfig.Builder clientSetInfoConfig(ClientSetInfoConfig setInfoConfig)
public DefaultJedisClientConfig.Builder readOnlyForRedisClusterReplicas()
public DefaultJedisClientConfig.Builder authXManager(AuthXManager authXManager)
public DefaultJedisClientConfig.Builder commandKeyArgumentPreProcessor(CommandKeyArgumentPreProcessor commandKeyArgumentPreProcessor)
Not honored by the legacy Jedis class — only the UnifiedJedis family
reads this value when constructing its command pipeline.
commandKeyArgumentPreProcessor - the pre-processor (or null to disable)public DefaultJedisClientConfig.Builder jsonObjectMapper(JsonObjectMapper jsonObjectMapper)
Not honored by the legacy Jedis class — only the UnifiedJedis family
reads this value when constructing its command pipeline.
jsonObjectMapper - the mapper (or null to fall back to the default)public DefaultJedisClientConfig.Builder searchDialect(int searchDialect)
SearchProtocol.DEFAULT_DIALECT.
Not honored by the legacy Jedis class — only the UnifiedJedis family
reads this value when constructing its command pipeline.
searchDialect - the dialect version (must not be 0)java.lang.IllegalArgumentException - if searchDialect == 0public DefaultJedisClientConfig.Builder from(JedisClientConfig instance)
Copyright © 2026. All rights reserved.