Interface ScheduledStart
- All Superinterfaces:
Serializable
A start of instances on a time schedule, once or regularly. Besides the schedule it holds the
policies for due times which cannot be handled as planned, the input values of the started
instances, whether it is enabled and a comment. It holds neither an identity nor a process
reference; whoever holds it identifies it and names the process it starts.
A scheduled start is immutable, so its holders may share it. Two scheduled starts are equal if
their schedules have the same first start, period and fixed rate and their other properties are
equal. Implementations delegate equals and hashCode to
equals(ScheduledStart, ScheduledStart) and hashCode(ScheduledStart), so that
starts of different implementations compare as well.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanWhether a scheduled start catches up missed due times unless stated otherwise.static final booleanWhether a scheduled start allows overlapping instances unless stated otherwise.static final intThe number of retries of a scheduled start unless stated otherwise. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanequals(ScheduledStart start1, ScheduledStart start2) Gets whether the designated scheduled starts are equal with respect to this interface, that is whether their schedules have the same first start, period and fixed rate and their other properties are equal.Gets the comment on this start, for instance its purpose.intGets the number of retries after a failed attempt to start an instance.Gets the time schedule which names the due times of this start.Gets the input values of the started instances by the names of the input parameters.static inthashCode(ScheduledStart start) Gets the hash code of the designated scheduled start with respect to this interface, which corresponds toequals(ScheduledStart, ScheduledStart).booleanGets whether this start is enabled.booleanGets whether due times which passed unhandled, for instance during a downtime, lead to a late start.booleanGets whether an instance is started at a due time while the instance started at the previous due time still runs; otherwise such a due time is skipped.
-
Field Details
-
DEFAULT_OVERLAP_ALLOWED
static final boolean DEFAULT_OVERLAP_ALLOWEDWhether a scheduled start allows overlapping instances unless stated otherwise.- See Also:
-
DEFAULT_MISSED_START_CAUGHT_UP
static final boolean DEFAULT_MISSED_START_CAUGHT_UPWhether a scheduled start catches up missed due times unless stated otherwise.- See Also:
-
DEFAULT_RETRY_COUNT
static final int DEFAULT_RETRY_COUNTThe number of retries of a scheduled start unless stated otherwise.- See Also:
-
-
Method Details
-
getSchedule
TimeSchedule getSchedule()Gets the time schedule which names the due times of this start.- Returns:
- The time schedule which names the due times of this start. This will never be
null.
-
isOverlapAllowed
boolean isOverlapAllowed()Gets whether an instance is started at a due time while the instance started at the previous due time still runs; otherwise such a due time is skipped. This applies to a fixed-rate schedule only, since with a fixed delay a due time follows the end of the previous instance.- Returns:
- Whether an instance is started while the instance of the previous due time still runs.
-
isMissedStartCaughtUp
boolean isMissedStartCaughtUp()Gets whether due times which passed unhandled, for instance during a downtime, lead to a late start. However many due times were missed, one instance is started at once for the latest of them; otherwise the schedule continues with its next due time.- Returns:
- Whether missed due times lead to one late start.
-
getRetryCount
int getRetryCount()Gets the number of retries after a failed attempt to start an instance. A retry follows at once.- Returns:
- The number of immediate retries after a failed attempt to start an instance.
-
getValues
Map<String,Serializable> getValues()Gets the input values of the started instances by the names of the input parameters. A value is aLong,Double,String,Boolean,Date,URIor UDT value, and a parameter without a value has no entry.- Returns:
- The unmodifiable input values of the started instances by parameter name. This will
never be
null.
-
isEnabled
boolean isEnabled()Gets whether this start is enabled. A disabled start starts no instances until it is enabled again.- Returns:
- Whether this start is enabled.
-
getComment
String getComment()Gets the comment on this start, for instance its purpose.- Returns:
- The comment on this start or
nullif there is none.
-
equals
Gets whether the designated scheduled starts are equal with respect to this interface, that is whether their schedules have the same first start, period and fixed rate and their other properties are equal.- Parameters:
start1- The first scheduled start to compare ornull.start2- The second scheduled start to compare ornull.- Returns:
- Whether the designated scheduled starts are equal with respect to this interface or
both
null.
-
hashCode
Gets the hash code of the designated scheduled start with respect to this interface, which corresponds toequals(ScheduledStart, ScheduledStart).- Parameters:
start- The scheduled start of which to get the hash code ornull.- Returns:
- The hash code of the designated scheduled start, 0 for
null.
-