CloudflareScheduleStore class final
A durable schedule occurrence ledger backed by an atomic Store and lock.
CloudflareDurableObjectStore is a suitable Cloudflare implementation: its lock operations are owner-aware across Worker isolates. The adapter deliberately stores only leases and completed occurrence keys; schedule definitions and executable actions remain in the application layer.
Constructors
- CloudflareScheduleStore({required Store store, LockProvider? locks, String keyPrefix = 'routed:schedule:', Duration completedTtl = const Duration(days: 366)})
-
Creates a schedule store from
store.
Properties
- completedTtl → Duration
-
How long completed occurrences remain deduplicated.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keyPrefix → String
-
Namespace prefix applied to occurrence keys.
final
- locks → LockProvider
-
Owner-aware lock provider used for occurrence leases.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → Store
-
Atomic key-value store used for claims and completion records.
final
Methods
-
claim(
ScheduleOccurrence occurrence, {required Duration lease}) → Future< ScheduleClaim?> -
Claims
occurrenceforlease.override -
complete(
ScheduleClaim claim) → Future< void> -
Marks
claimas dispatched successfully.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
ScheduleClaim claim) → Future< void> -
Releases
claimwhose action failed before dispatch completed.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited