Package-level declarations
Types
A job claimed under a lease, with everything a worker needs to execute it.
One job in full, for a detail view. payload is the serialized form as stored; anything mounted on top of this (the dashboard) shows it to operators, which is worth remembering when payloads carry sensitive data: the dashboard fails closed on authentication for exactly that reason.
Filter and page for QueryableStore.listJobs. Null filter fields mean "any". limit/offset page through the filtered set; stores order results most recently persisted first, so page 0 is the newest work.
One job row as a listing sees it: everything but the payload and lease internals.
A job to persist. payload is the serialized form (JSON by default); payloadVersion is the envelope version, present from v1 so wire-format evolution never needs a data migration.
Optional capability: the store can push "new work may be available" signals (Postgres LISTEN/NOTIFY, an in-process channel for the in-memory store), so the runtime does not depend on polling for latency. Emissions are wake-up hints and carry no payload; spurious emissions are allowed.
Optional capability: read access for dashboards and tooling. Kept OUT of JobStore deliberately: the core contract is the minimal thing a store must get right to run jobs safely, and observation is additive. A store without this capability is still a valid backend; it just cannot serve the dashboard.
A due schedule claimed under a lease, with what the runtime needs to compute the fire.
A recurring schedule's persisted identity and timing state, as the runtime registers it. The store never sees or evaluates a schedule expression: all schedule math (cron, DSL, misfire policy, payloads) lives in the runtime, and the store only keeps the fields below plus per-row lease state. fingerprint is an opaque string the runtime derives from the full definition; stores compare it for equality and never parse it.
Optional capability: enqueue participating in a caller-supplied transaction of type TX. The job is visible to workers if and only if the transaction commits. The transaction is passed explicitly because thread-local transaction state does not survive coroutine thread hops.