Class SchedulerConfig


public class SchedulerConfig extends AbstractServiceConfig<SchedulerConfig.Builder>
Configuration for Scheduler-specific container settings.

Instances are created via SchedulerConfig.Builder:


 SchedulerConfig config = SchedulerConfig.builder()
     .invocationEnabled(false)
     .tickIntervalSeconds(5)
     .build();
 
  • Method Details

    • builder

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

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

      public boolean isInvocationEnabled()
      Returns whether the background dispatcher that fires schedule targets is enabled. When false, the scheduler API is CRUD-only.
      Returns:
      true if invocation is enabled
    • getTickIntervalSeconds

      public long getTickIntervalSeconds()
      Returns how often the dispatcher scans for due schedules, in seconds.
      Returns:
      the tick interval in seconds
    • 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<SchedulerConfig.Builder>
      Parameters:
      container - the container to configure