Class SchedulerConfig
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfig<SchedulerConfig.Builder>
io.floci.testcontainers.config.services.SchedulerConfig
Configuration for Scheduler-specific container settings.
Instances are created via SchedulerConfig.Builder:
SchedulerConfig config = SchedulerConfig.builder()
.invocationEnabled(false)
.tickIntervalSeconds(5)
.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 SchedulerConfig.Builderbuilder()Returns a newSchedulerConfig.Builderfor this configuration.longReturns how often the dispatcher scans for due schedules, in seconds.booleanReturns whether the background dispatcher that fires schedule targets is enabled.Returns a newSchedulerConfig.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 newSchedulerConfig.Builderfor this configuration.- Returns:
- a new builder
-
toBuilder
Returns a newSchedulerConfig.Builderfor this configuration, initialized with the current values of this instance.- Specified by:
toBuilderin classAbstractServiceConfig<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. Whenfalse, the scheduler API is CRUD-only.- Returns:
trueif 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:AbstractServiceConfigApplies this service configuration to the given container by setting the appropriate environment variables.- Overrides:
applyEnvVarsToContainerin classAbstractServiceConfig<SchedulerConfig.Builder>- Parameters:
container- the container to configure
-