Class BatchConfig
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfig<BatchConfig.Builder>
io.floci.testcontainers.config.services.BatchConfig
Configuration for Batch-specific container settings.
Instances are created via BatchConfig.Builder:
BatchConfig config = BatchConfig.builder()
.enabled(true)
.runnerMode("deferred")
.dockerNetwork("my-batch-network")
.build();
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfig
DEFAULT_ENABLED -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEnvVarsToContainer(org.testcontainers.containers.Container<?> container) Applies this service configuration to the given container by setting the appropriate environment variables.static BatchConfig.Builderbuilder()Returns a newBatchConfig.Builderfor this configuration.Returns the Docker network used for Batch containers, ornullif not set.Returns the runner mode used for Batch jobs.Returns a newBatchConfig.Builderfor this configuration, initialized with the current values of this instance.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfig
applyExposedPortsToContainer, isEnabled
-
Method Details
-
builder
Returns a newBatchConfig.Builderfor this configuration.- Returns:
- a new builder
-
toBuilder
Returns a newBatchConfig.Builderfor this configuration, initialized with the current values of this instance.- Specified by:
toBuilderin classAbstractServiceConfig<BatchConfig.Builder>- Returns:
- a new builder pre-populated with this configuration's values
-
getRunnerMode
Returns the runner mode used for Batch jobs.- Returns:
- the runner mode
-
getDockerNetwork
Returns the Docker network used for Batch containers, ornullif not set.- Returns:
- the Docker network name, or
null
-
applyEnvVarsToContainer
public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container) Description copied from class:AbstractServiceConfigApplies this service configuration to the given container by setting the appropriate environment variables.- Overrides:
applyEnvVarsToContainerin classAbstractServiceConfig<BatchConfig.Builder>- Parameters:
container- the container to configure
-