Interface ScheduledStart

All Superinterfaces:
Serializable

public interface ScheduledStart extends 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

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    Whether a scheduled start catches up missed due times unless stated otherwise.
    static final boolean
    Whether a scheduled start allows overlapping instances unless stated otherwise.
    static final int
    The number of retries of a scheduled start unless stated otherwise.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    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.
    int
    Gets 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 int
    Gets the hash code of the designated scheduled start with respect to this interface, which corresponds to equals(ScheduledStart, ScheduledStart).
    boolean
    Gets whether this start is enabled.
    boolean
    Gets whether due times which passed unhandled, for instance during a downtime, lead to a late start.
    boolean
    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.
  • Field Details

    • DEFAULT_OVERLAP_ALLOWED

      static final boolean DEFAULT_OVERLAP_ALLOWED
      Whether a scheduled start allows overlapping instances unless stated otherwise.
      See Also:
    • DEFAULT_MISSED_START_CAUGHT_UP

      static final boolean DEFAULT_MISSED_START_CAUGHT_UP
      Whether a scheduled start catches up missed due times unless stated otherwise.
      See Also:
    • DEFAULT_RETRY_COUNT

      static final int DEFAULT_RETRY_COUNT
      The 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 a Long, Double, String, Boolean, Date, URI or 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 null if there is none.
    • equals

      static boolean equals(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.
      Parameters:
      start1 - The first scheduled start to compare or null.
      start2 - The second scheduled start to compare or null.
      Returns:
      Whether the designated scheduled starts are equal with respect to this interface or both null.
    • hashCode

      static int hashCode(ScheduledStart start)
      Gets the hash code of the designated scheduled start with respect to this interface, which corresponds to equals(ScheduledStart, ScheduledStart).
      Parameters:
      start - The scheduled start of which to get the hash code or null.
      Returns:
      The hash code of the designated scheduled start, 0 for null.