Class Scheduling

java.lang.Object
org.gcube.vremanagement.executor.api.types.Scheduling
All Implemented Interfaces:
Comparable<Scheduling>

public class Scheduling extends Object implements Comparable<Scheduling>
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • cronExpression

      protected String cronExpression
      CRON like expression for a repetitive task. This field is not valid when using delay
    • delay

      protected Integer delay
      Delay between subsequent execution in seconds. This field is not valid when using cronExpression
    • schedulingTimes

      protected int schedulingTimes
      Indicates the number of times the scheduling pattern must be applied. 0 means indefinitely.
    • firstStartTime

      protected Long firstStartTime
      The first instant when the scheduling can start
    • endTime

      protected Long endTime
      Time at which the Trigger will no longer fire even if it's schedule has remaining repeats.
    • previuosExecutionsMustBeCompleted

      protected boolean previuosExecutionsMustBeCompleted
      When using cronExpression run the subsequent task only if the previous are terminated otherwise this execution is discarded and the subsequent execution will start when fired by the the next scheduling. The discarded execution is counted in the total number of executions happened.
    • global

      protected boolean global
      Indicate if the Scheduled Task has to be take in charge from another SmartExecutor instance if the initial one die.
  • Constructor Details

    • Scheduling

      protected Scheduling()
      Protected default constructor for serialization.
    • Scheduling

      public Scheduling(org.quartz.CronExpression cronExpression)
    • Scheduling

      public Scheduling(org.quartz.CronExpression cronExpression, boolean previuosExecutionsMustBeCompleted)
    • Scheduling

      public Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes)
    • Scheduling

      public Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes, boolean previuosExecutionsMustBeCompleted)
    • Scheduling

      public Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes, Calendar firstStartTime, Calendar endTime)
    • Scheduling

      public Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes, Calendar firstStartTime, Calendar endTime, boolean previuosExecutionsMustBeCompleted)
    • Scheduling

      public Scheduling(int delay)
      Constructor with delay in milliseconds.
      Parameters:
      delay - the delay between executions in milliseconds
    • Scheduling

      public Scheduling(int delay, boolean previuosExecutionsMustBeCompleted)
    • Scheduling

      public Scheduling(int delay, int schedulingTimes)
    • Scheduling

      public Scheduling(int delay, int schedulingTimes, boolean previuosExecutionsMustBeCompleted)
    • Scheduling

      public Scheduling(int delay, int schedulingTimes, Calendar firstStartTime, Calendar endTime)
    • Scheduling

      public Scheduling(int delay, int schedulingTimes, Calendar firstStartTime, Calendar endTime, boolean previuosExecutionsMustBeCompleted)
  • Method Details

    • init

      protected void init(org.quartz.CronExpression cronExpression, Integer delay, int schedulingTimes, Long firstStartTime, Long endTime, boolean previuosExecutionsMustBeCompleted, boolean global)
    • getCronExpression

      public String getCronExpression()
      Returns:
      the cronExpression
    • getDelay

      public Integer getDelay()
      Returns:
      the delay
    • getSchedulingTimes

      public int getSchedulingTimes()
      Returns:
      the schedulingTimes
    • mustPreviousExecutionsCompleted

      public boolean mustPreviousExecutionsCompleted()
      Returns:
      the previuosExecutionMustBeCompleted
    • getFirstStartTime

      public Long getFirstStartTime()
      Returns:
      the firstStartTime
    • setFirstStartTime

      public void setFirstStartTime(Long firstStartTime)
      Parameters:
      firstStartTime - the firstStartTime to set
    • getEndTime

      public Long getEndTime()
      Returns:
      the endTime
    • getGlobal

      public Boolean getGlobal()
      Returns:
      the global
    • setGlobal

      public void setGlobal(Boolean global)
      Parameters:
      global - the global to set
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Scheduling scheduling)
      }
      Specified by:
      compareTo in interface Comparable<Scheduling>