Class BatchConfig


public class BatchConfig extends AbstractServiceConfig<BatchConfig.Builder>
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();
 
  • Method Details

    • builder

      public static BatchConfig.Builder builder()
      Returns a new BatchConfig.Builder for this configuration.
      Returns:
      a new builder
    • toBuilder

      public BatchConfig.Builder toBuilder()
      Returns a new BatchConfig.Builder for this configuration, initialized with the current values of this instance.
      Specified by:
      toBuilder in class AbstractServiceConfig<BatchConfig.Builder>
      Returns:
      a new builder pre-populated with this configuration's values
    • getRunnerMode

      public String getRunnerMode()
      Returns the runner mode used for Batch jobs.
      Returns:
      the runner mode
    • getDockerNetwork

      public String getDockerNetwork()
      Returns the Docker network used for Batch containers, or null if not set.
      Returns:
      the Docker network name, or null
    • applyEnvVarsToContainer

      public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by setting the appropriate environment variables.
      Overrides:
      applyEnvVarsToContainer in class AbstractServiceConfig<BatchConfig.Builder>
      Parameters:
      container - the container to configure