public abstract class StandaloneClientBuilder<C> extends AbstractClientBuilder<StandaloneClientBuilder<C>,C>
This builder provides methods specific to standalone Redis deployments, including host/port configuration, URI-based configuration, and client configuration options.
cache, cacheConfig, clientConfig, commandExecutor, commandObjects, connectionProvider, jsonObjectMapper, keyPreProcessor, poolConfig, searchDialect| Constructor and Description |
|---|
StandaloneClientBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected ConnectionProvider |
createDefaultConnectionProvider()
Creates a default connection provider based on the current configuration.
|
StandaloneClientBuilder<C> |
fromURI(java.lang.String uriString)
Sets the Redis server URI from a string.
|
StandaloneClientBuilder<C> |
fromURI(java.net.URI uri)
Sets the Redis server URI.
|
StandaloneClientBuilder<C> |
hostAndPort(HostAndPort hostAndPort)
Sets the Redis server host and port.
|
StandaloneClientBuilder<C> |
hostAndPort(java.lang.String host,
int port)
Sets the Redis server host and port.
|
protected StandaloneClientBuilder<C> |
self()
Returns the concrete builder instance for method chaining.
|
protected void |
validateSpecificConfiguration()
Validates the builder-specific configuration.
|
applyCommandObjectsConfiguration, build, cache, cacheConfig, clientConfig, commandExecutor, connectionProvider, createClient, createDefaultClientConfig, createDefaultCommandExecutor, createDefaultCommandObjects, jsonObjectMapper, keyPreProcessor, poolConfig, searchDialect, validateCommonConfigurationpublic StandaloneClientBuilder<C> hostAndPort(java.lang.String host, int port)
host - the Redis server hostnameport - the Redis server portpublic StandaloneClientBuilder<C> hostAndPort(HostAndPort hostAndPort)
hostAndPort - the Redis server host and portprotected StandaloneClientBuilder<C> self()
AbstractClientBuilderself in class AbstractClientBuilder<StandaloneClientBuilder<C>,C>protected ConnectionProvider createDefaultConnectionProvider()
AbstractClientBuildercreateDefaultConnectionProvider in class AbstractClientBuilder<StandaloneClientBuilder<C>,C>protected void validateSpecificConfiguration()
AbstractClientBuilderThis method is called by the generic build() method to validate configuration specific to each builder type. Implementations should call validateCommonConfiguration() and then perform their own specific validation.
validateSpecificConfiguration in class AbstractClientBuilder<StandaloneClientBuilder<C>,C>public StandaloneClientBuilder<C> fromURI(java.lang.String uriString)
uriString - the Redis server URI stringpublic StandaloneClientBuilder<C> fromURI(java.net.URI uri)
uri - the Redis server URICopyright © 2025. All rights reserved.