Class Scheduling
java.lang.Object
org.gcube.vremanagement.executor.api.types.Scheduling
- All Implemented Interfaces:
Comparable<Scheduling>
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringCRON like expression for a repetitive task.protected IntegerDelay between subsequent execution in seconds.protected LongTime at which the Trigger will no longer fire even if it's schedule has remaining repeats.protected LongThe first instant when the scheduling can startprotected booleanIndicate if the Scheduled Task has to be take in charge from another SmartExecutor instance if the initial one die.protected booleanWhen 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.protected intIndicates the number of times the scheduling pattern must be applied. 0 means indefinitely. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected default constructor for serialization.Scheduling(int delay) Constructor with delay in milliseconds.Scheduling(int delay, boolean previuosExecutionsMustBeCompleted) Scheduling(int delay, int schedulingTimes) Scheduling(int delay, int schedulingTimes, boolean previuosExecutionsMustBeCompleted) Scheduling(int delay, int schedulingTimes, Calendar firstStartTime, Calendar endTime) Scheduling(int delay, int schedulingTimes, Calendar firstStartTime, Calendar endTime, boolean previuosExecutionsMustBeCompleted) Scheduling(org.quartz.CronExpression cronExpression) Scheduling(org.quartz.CronExpression cronExpression, boolean previuosExecutionsMustBeCompleted) Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes) Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes, boolean previuosExecutionsMustBeCompleted) Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes, Calendar firstStartTime, Calendar endTime) Scheduling(org.quartz.CronExpression cronExpression, int schedulingTimes, Calendar firstStartTime, Calendar endTime, boolean previuosExecutionsMustBeCompleted) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Scheduling scheduling) }getDelay()intprotected voidinit(org.quartz.CronExpression cronExpression, Integer delay, int schedulingTimes, Long firstStartTime, Long endTime, boolean previuosExecutionsMustBeCompleted, boolean global) booleanvoidsetFirstStartTime(Long firstStartTime) voidtoString()
-
Field Details
-
cronExpression
CRON like expression for a repetitive task. This field is not valid when using delay -
delay
Delay between subsequent execution in seconds. This field is not valid when using cronExpression -
schedulingTimes
protected int schedulingTimesIndicates the number of times the scheduling pattern must be applied. 0 means indefinitely. -
firstStartTime
The first instant when the scheduling can start -
endTime
Time at which the Trigger will no longer fire even if it's schedule has remaining repeats. -
previuosExecutionsMustBeCompleted
protected boolean previuosExecutionsMustBeCompletedWhen 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 globalIndicate 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
-
Scheduling
-
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
-
Scheduling
-
-
Method Details
-
init
-
getCronExpression
- Returns:
- the cronExpression
-
getDelay
- Returns:
- the delay
-
getSchedulingTimes
public int getSchedulingTimes()- Returns:
- the schedulingTimes
-
mustPreviousExecutionsCompleted
public boolean mustPreviousExecutionsCompleted()- Returns:
- the previuosExecutionMustBeCompleted
-
getFirstStartTime
- Returns:
- the firstStartTime
-
setFirstStartTime
- Parameters:
firstStartTime- the firstStartTime to set
-
getEndTime
- Returns:
- the endTime
-
getGlobal
- Returns:
- the global
-
setGlobal
- Parameters:
global- the global to set
-
toString
-
compareTo
}- Specified by:
compareToin interfaceComparable<Scheduling>
-