Interface ScheduledProcessStartEvent
- All Superinterfaces:
Event,TimeScheduleEvent
- All Known Implementing Classes:
ScheduledProcessStartEventImpl
The event which a scheduled process start raises at one of its due times. Besides the start, it
carries the instance which the last successful trigger of the start has started, and the handler
executing the start sets the outcome of the trigger on it: the instance it has started, the time
of its last failed attempt or the skip of the due time. The source of the event reads the outcome
once the handling has ended; a trigger without an outcome counts as failed at that time.
-
Method Summary
Modifier and TypeMethodDescriptionGets the time of the last failed attempt of the trigger of this event.Gets the ID of the instance which the last successful trigger of the start has started.Gets the scheduled process start which has raised this event.Gets the ID of the instance which the trigger of this event has started.booleanGets whether the trigger of this event has skipped its due time.voidSets the outcome of the trigger of this event: every attempt to start an instance has failed, the last one at the designated time.voidSets the outcome of the trigger of this event: it has skipped its due time without attempting to start an instance.voidsetStarted(UUID instanceID) Sets the outcome of the trigger of this event: it has started the instance of the designated ID.Methods inherited from interface de.aristaflow.adept2.model.events.Event
getCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeMethods inherited from interface de.aristaflow.adept2.model.events.TimeScheduleEvent
getDueTime, getSchedule
-
Method Details
-
getScheduledProcessStart
ScheduledProcessStart getScheduledProcessStart()Gets the scheduled process start which has raised this event.- Returns:
- The scheduled process start which has raised this event. This will never be
null.
-
getLastInstance
UUID getLastInstance()Gets the ID of the instance which the last successful trigger of the start has started. A start with a fixed rate which allows no overlapping instances skips its due time while this instance runs.- Returns:
- The ID of the instance which the last successful trigger of the start has started or
nullif no trigger has started one.
-
setStarted
Sets the outcome of the trigger of this event: it has started the instance of the designated ID. This replaces an outcome set before.- Parameters:
instanceID- The ID of the started instance. This must not benull.
-
setFailed
Sets the outcome of the trigger of this event: every attempt to start an instance has failed, the last one at the designated time. This replaces an outcome set before.- Parameters:
lastAttempt- The time of the last failed attempt. This must not benull.
-
setSkipped
void setSkipped()Sets the outcome of the trigger of this event: it has skipped its due time without attempting to start an instance. This replaces an outcome set before. -
getStartedInstance
UUID getStartedInstance()Gets the ID of the instance which the trigger of this event has started.- Returns:
- The ID of the instance which the trigger of this event has started or
nullif its outcome is another one or it has none.
-
getLastFailedAttempt
Instant getLastFailedAttempt()Gets the time of the last failed attempt of the trigger of this event.- Returns:
- The time of the last failed attempt of the trigger of this event or
nullif its outcome is another one or it has none.
-
isSkipped
boolean isSkipped()Gets whether the trigger of this event has skipped its due time.- Returns:
- Whether the trigger of this event has skipped its due time.
-