Class ElastiCacheConfig.Builder
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfigBuilder<ElastiCacheConfig.Builder,ElastiCacheConfig>
io.floci.testcontainers.config.services.ElastiCacheConfig.Builder
- Enclosing class:
- ElastiCacheConfig
public static class ElastiCacheConfig.Builder
extends AbstractServiceConfigBuilder<ElastiCacheConfig.Builder,ElastiCacheConfig>
Builder for
ElastiCacheConfig.-
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutableElastiCacheConfigfrom this builder.defaultImage(String defaultImage) Sets the default Docker image for ElastiCache (Valkey) instances.defaultMemcachedImage(String defaultMemcachedImage) Sets the default Docker image for Memcached instances.dockerNetwork(String dockerNetwork) Sets the Docker network that ElastiCache containers should join.proxyPortRange(int basePort, int amount) Sets the port range for the ElastiCache proxy.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled
-
Method Details
-
proxyPortRange
Sets the port range for the ElastiCache proxy.- Parameters:
basePort- the base port (default 6379)amount- the amount of ports (default 10)- Returns:
- this builder
-
defaultImage
Sets the default Docker image for ElastiCache (Valkey) instances.- Parameters:
defaultImage- the image name (default "valkey/valkey:8")- Returns:
- this builder
-
defaultMemcachedImage
Sets the default Docker image for Memcached instances.- Parameters:
defaultMemcachedImage- the Memcached image name (default "memcached:1.6")- Returns:
- this builder
-
dockerNetwork
Sets the Docker network that ElastiCache containers should join.- Parameters:
dockerNetwork- the network name, ornullto use the default bridge- Returns:
- this builder
-
build
Creates an immutableElastiCacheConfigfrom this builder.- Specified by:
buildin classAbstractServiceConfigBuilder<ElastiCacheConfig.Builder,ElastiCacheConfig> - Returns:
- the ElastiCache configuration
-