Class CronConfig.BuilderBase.CronConfigImpl
java.lang.Object
io.helidon.scheduling.TaskConfig.BuilderBase.TaskConfigImpl
io.helidon.scheduling.CronConfig.BuilderBase.CronConfigImpl
- All Implemented Interfaces:
Prototype.Api, Prototype.Factory<Cron>, CronConfig, TaskConfig, Supplier<Cron>
- Enclosing class:
CronConfig.BuilderBase<BUILDER extends CronConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends CronConfig>
protected static class CronConfig.BuilderBase.CronConfigImpl
extends TaskConfig.BuilderBase.TaskConfigImpl
implements CronConfig, Supplier<Cron>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface CronConfig
CronConfig.Builder, CronConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forCron.static classCronConfig.BuilderBase<BUILDER extends CronConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends CronConfig>Fluent API builder base forCronConfig.Nested classes/interfaces inherited from interface TaskConfig
TaskConfig.Builder, TaskConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forTaskConfig.static classTaskConfig.BuilderBase<BUILDER extends TaskConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends TaskConfig>Fluent API builder base forTaskConfig. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCronConfigImpl(CronConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new runtime instance from this prototype.booleanAllow concurrent execution if previous task didn't finish before next execution.booleanCron expression for specifying period of execution.get()inthashCode()task()Task to be scheduled for execution.toString()zone()Time zone to use for cron expression evaluation.Methods inherited from class TaskConfig.BuilderBase.TaskConfigImpl
enabled, executor, id, taskManagerModifier and TypeMethodDescriptionbooleanenabled()Whether the task is enabled.executor()CustomScheduledExecutorServiceused for executing scheduled task.id()Identification of the started task.Task manager that will manage the created task.
-
Constructor Details
-
CronConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
build
Create a new runtime instance from this prototype.- Specified by:
buildin interfacePrototype.Factory<Cron>- Returns:
- new configured runtime instance
-
get
-
expression
Description copied from interface:CronConfigCron expression for specifying period of execution.Examples:
0/2 * * * * ? *- Every 2 seconds0 45 9 ? * *- Every day at 9:450 15 8 ? * MON-FRI- Every workday at 8:15
- Specified by:
expressionin interfaceCronConfig- Returns:
- cron expression
-
zone
Description copied from interface:CronConfigTime zone to use for cron expression evaluation. Defaults toZoneId.systemDefault().The time zone determines when the cron expression triggers. For example, a cron expression
0 0 9 * * ?(every day at 9:00 AM) with zoneAmerica/New_Yorkwill trigger at 9:00 AM Eastern Time, regardless of the system's default time zone.- Specified by:
zonein interfaceCronConfig- Returns:
- time zone for cron expression evaluation
-
concurrentExecution
public boolean concurrentExecution()Description copied from interface:CronConfigAllow concurrent execution if previous task didn't finish before next execution. Default value istrue.- Specified by:
concurrentExecutionin interfaceCronConfig- Returns:
- true for allow concurrent execution.
-
task
Description copied from interface:CronConfigTask to be scheduled for execution.- Specified by:
taskin interfaceCronConfig- Returns:
- scheduled for execution
-
toString
- Overrides:
toStringin classTaskConfig.BuilderBase.TaskConfigImpl
-
equals
- Overrides:
equalsin classTaskConfig.BuilderBase.TaskConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classTaskConfig.BuilderBase.TaskConfigImpl
-