Annotation Interface Deadline
Declares one desired, one-shot deadline on a Model. A pure instance method returns
Schedule, a payload when annotation timing is configured, or null to cancel. Parameters may be
typed Model ancestors or Graph views. Cron selects the next match without enabling periodic
execution. Both sides of a change use the same reference clock; unchanged declarations retain
their recorded original time. Once that time has arrived, changed timing, payload, application
metadata or schedule ID cannot recreate the deadline. Return null and later a payload to start
a new cycle. Runtime rechecks the original time at transaction acceptance in scheduler milliseconds;
an expired replacement rebuilds deadline effects and Model metadata without reexecuting applies or handlers.
External cancellation is neither queried nor recorded by deadline planning. Both evaluations use current
configuration, so a property change alone does not reconcile an existing deadline.
Comparison includes time, payload, application metadata and explicitly supplied schedule IDs.
Generated IDs, message timestamps and reserved metadata (keys starting with $) are ignored.
The SDK retains category metadata under $fluxzero.deadline.* in existing Model storage;
Graph.deadlines() exposes it for the exact revision. These values
describe planned work, not successful execution. Reads and replay never schedule work. Commands
execute as the configured system user. Concrete scheduler changes share the Model commit.
All writers of the Model or its injected context must run the same declarations. Stateful
handlers are not supported.
-
Field Summary
Fields -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanCancels the last committed schedule on logical Model deletion, including cascades.booleanWhether the payload is dispatched as a command.Cron expression selecting the next deadline, with the same syntax and property substitution asPeriodic.longDelay from the change that creates or changes the payload.Unit ofdelay().Time zone for cron evaluation.Stable category within the Model.
-
Field Details
-
DISABLED
A property-resolvable cron value that disables the declaration.- See Also:
-
-
Element Details
-
cron
-
timeZone
-
delay
long delayDelay from the change that creates or changes the payload. Required for plain payloads without cron.- Default:
-1L
-
timeUnit
-
value
String valueStable category within the Model. Declare distinct names when a Model has multiple deadlines.- Default:
"default"
-
command
boolean commandWhether the payload is dispatched as a command. False selects ordinary HandleSchedule handling.- Default:
true
-
cancelOnDeletion
boolean cancelOnDeletionCancels the last committed schedule on logical Model deletion, including cascades.- Default:
true
-