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.
  • Constructor Details

    • CronConfigImpl

      protected CronConfigImpl(CronConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • build

      public Cron build()
      Description copied from interface: Prototype.Factory
      Create a new instance of the runtime type from this config object.
      Specified by:
      build in interface Prototype.Factory<Cron>
      Returns:
      new configured runtime instance
    • get

      public Cron get()
      Specified by:
      get in interface Supplier<Cron>
    • expression

      public String expression()
      Description copied from interface: CronConfig
      Cron expression for specifying period of execution.

      Examples:

      • 0/2 * * * * ? * - Every 2 seconds
      • 0 45 9 ? * * - Every day at 9:45
      • 0 15 8 ? * MON-FRI - Every workday at 8:15
      Specified by:
      expression in interface CronConfig
      Returns:
      cron expression
    • zone

      public ZoneId zone()
      Description copied from interface: CronConfig
      Time zone to use for cron expression evaluation. Defaults to ZoneId.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 zone America/New_York will trigger at 9:00 AM Eastern Time, regardless of the system's default time zone.

      Specified by:
      zone in interface CronConfig
      Returns:
      time zone for cron expression evaluation
    • concurrentExecution

      public boolean concurrentExecution()
      Description copied from interface: CronConfig
      Allow concurrent execution if previous task didn't finish before next execution. Default value is true.
      Specified by:
      concurrentExecution in interface CronConfig
      Returns:
      true for allow concurrent execution.
    • task

      Description copied from interface: CronConfig
      Task to be scheduled for execution.
      Specified by:
      task in interface CronConfig
      Returns:
      scheduled for execution
    • toString

      public String toString()
      Overrides:
      toString in class TaskConfig.BuilderBase.TaskConfigImpl
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class TaskConfig.BuilderBase.TaskConfigImpl
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class TaskConfig.BuilderBase.TaskConfigImpl