Class ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder
java.lang.Object
io.valkey.springframework.data.valkey.connection.valkeyglide.ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder
- Enclosing interface:
- ValkeyGlideClientConfiguration
public static class ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder
extends Object
Builder for
ValkeyGlideClientConfiguration.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theValkeyGlideClientConfiguration.Set the client availability zone.commandTimeout(Duration commandTimeout) Set the command timeout.connectionTimeout(Duration connectionTimeout) Set the connection timeout.inflightRequestsLimit(Integer inflightRequestsLimit) Set the maximum number of concurrent in-flight requests.maxPoolSize(int maxPoolSize) Set the maximum pool size for client pooling.readFrom(glide.api.models.configuration.ReadFrom readFrom) Set the read from strategy.reconnectStrategy(glide.api.models.configuration.BackoffStrategy reconnectStrategy) Set the reconnection strategy.useIamAuthentication(ValkeyGlideClientConfiguration.IamAuthenticationForGlide iamAuthentication) Configure IAM authentication for connecting to AWS ElastiCache or MemoryDB.useOpenTelemetry(ValkeyGlideClientConfiguration.OpenTelemetryForGlide openTelemetryForGlide) Initialize GLIDE OpenTelemetry with OTLP endpoints.useSsl()Enable SSL for the connection.
-
Method Details
-
commandTimeout
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder commandTimeout(Duration commandTimeout) Set the command timeout.- Parameters:
commandTimeout- the command timeout duration.- Returns:
- this builder.
-
connectionTimeout
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder connectionTimeout(Duration connectionTimeout) Set the connection timeout.- Parameters:
connectionTimeout- the connection timeout duration.- Returns:
- this builder.
-
useSsl
Enable SSL for the connection.- Returns:
- this builder.
-
readFrom
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder readFrom(glide.api.models.configuration.ReadFrom readFrom) Set the read from strategy.- Parameters:
readFrom- theReadFromstrategy.- Returns:
- this builder.
-
inflightRequestsLimit
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder inflightRequestsLimit(Integer inflightRequestsLimit) Set the maximum number of concurrent in-flight requests.- Parameters:
inflightRequestsLimit- the inflight requests limit.- Returns:
- this builder.
-
clientAZ
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder clientAZ(String clientAZ) Set the client availability zone.- Parameters:
clientAZ- the client AZ.- Returns:
- this builder.
-
reconnectStrategy
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder reconnectStrategy(glide.api.models.configuration.BackoffStrategy reconnectStrategy) Set the reconnection strategy.- Parameters:
reconnectStrategy- theBackoffStrategy.- Returns:
- this builder.
-
useOpenTelemetry
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder useOpenTelemetry(ValkeyGlideClientConfiguration.OpenTelemetryForGlide openTelemetryForGlide) Initialize GLIDE OpenTelemetry with OTLP endpoints. If at least one endpoint (traces or metrics) is provided, this will initialize OpenTelemetry once per JVM. -
maxPoolSize
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder maxPoolSize(int maxPoolSize) Set the maximum pool size for client pooling.- Parameters:
maxPoolSize- the maximum number of clients in the pool.- Returns:
- this builder.
-
useIamAuthentication
public ValkeyGlideClientConfiguration.ValkeyGlideClientConfigurationBuilder useIamAuthentication(ValkeyGlideClientConfiguration.IamAuthenticationForGlide iamAuthentication) Configure IAM authentication for connecting to AWS ElastiCache or MemoryDB.When IAM authentication is enabled, the GLIDE client will automatically generate and refresh IAM authentication tokens. This is mutually exclusive with password-based authentication.
- Parameters:
iamAuthentication- the IAM authentication configuration.- Returns:
- this builder.
-
build
Build theValkeyGlideClientConfiguration.- Returns:
- a new
ValkeyGlideClientConfigurationinstance.
-