Namespace Millrace.Storage
Namespaces
Classes
- BookmarkRecord
A suspended workflow instance's wait-point for a signal (ARCHITECTURE.md §6.3). While a bookmark exists no job does — a suspended workflow costs nothing.
- ClaimRequest
A worker's request to claim jobs.
Queuesis an unordered filter set — selection order (Priority DESC, then FIFO by enqueue order) applies across the union of the requested queues with no queue precedence.
- JobAttempt
One execution of a job that did not succeed (§11.27).
- JobAttemptRules
Which transitions end an attempt worth recording (§11.27).
- JobInvocation
The serialized form of a captured job call: which method to invoke and with what arguments.
- JobRecord
A job as persisted by a storage provider. Immutable — providers store snapshots and the engine derives new states via JobTransition, never by mutation.
- JobStateExtensions
Helpers over JobState.
- JobTransition
An engine-computed state transition applied atomically by the provider — the provider's only duty is to apply it all-or-nothing behind the fence; retry policy, backoff math, and continuation logic never live in providers (ARCHITECTURE.md §4.1).
- MillraceConcurrencyException
A conditional write matched nothing:
UpdateInstanceAsyncwith a stale revision or a missing instance (providers must not distinguish — one statement can't), andCreateInstanceAsyncwith a duplicate id (a conflicting write at revision zero). Callers reload and retry their merge.
- MillraceParentJobNotFoundException
An Awaiting insert referenced a ParentId that does not exist (thrown by
EnqueueAsyncand theJobTransition.Enqueueinsert path during the continuation fixup).
- MillraceStorageException
Base type for the storage exceptions the contract mandates. Providers are not required to wrap transient/infrastructure errors. Style rule: return-value signaling (
ApplyAsyncfalse,TryFireRecurringAsyncfalse,TryCancelAsyncfalse, renewal omissions) is for expected multi-node races where the loser simply drops; exceptions are for caller contract violations or conflicts requiring caller reaction.
- RecurringJobRecord
A recurring (cron) job definition. Firing is fenced by compare-and-set on NextFireTime with the fired job inserted in the same atomic operation, giving exactly-once enqueue per occurrence (see TryFireRecurringAsync(string, DateTimeOffset, DateTimeOffset, JobRecord, CancellationToken)).
- WorkflowCheckpoint
A workflow instance update carried inside a JobTransition, so the checkpoint commits in the same transaction as the activity job's own transition.
- WorkflowInstanceRecord
A workflow instance as persisted by a provider. The engine (0.3) checkpoints progress by replacing the record under optimistic concurrency (Revision).
Structs
- QueueSignal
A wakeup hint that jobs may be claimable on
Queue.
Interfaces
- IJobStorage
The Layer 0 job storage contract (ARCHITECTURE.md §4). Providers implement a small surface with strict atomicity guarantees (§4.2) — everything clever (state machines, retry math, cron) lives in the engine. The conformance kit in
Millrace.Storage.Verificationenforces every normative statement in these docs; a provider that passes is a supported provider.
- IStorageNotifier
Optional push channel (ARCHITECTURE.md §4.1). Providers with a native mechanism (e.g. Postgres LISTEN/NOTIFY) implement this and advertise Notifications; otherwise workers poll adaptively. Signals are best-effort — they may be dropped or duplicated; correctness never depends on them, only wakeup latency.
- IWorkflowStorage
The Layer 0 workflow storage contract (ARCHITECTURE.md §4.1). The contract ships and is conformance-tested in 0.1; the engine that drives it lands in 0.3.
Enums
- JobAttemptOutcome
How an execution ended, for the attempts that did not simply succeed.
- JobState
Lifecycle states of a job (ARCHITECTURE.md §5.1).
- StorageCapabilities
Optional powers a provider advertises; the engine adapts (ARCHITECTURE.md §4 P3). Batch claiming is not a capability — MaxCount is always honored best-effort (returning fewer jobs than requested is always conformant).
- WorkflowInstanceState
Lifecycle states of a workflow instance (ARCHITECTURE.md §6).