Package-level declarations

Types

Link copied to clipboard
class Timer @InternalWowApi constructor(val id: String, val owner: AggregateRef, val key: String, val version: Long, val partition: Int, val rule: ScheduleRule, val dueAt: Long, val target: AggregateRef, val commandType: String, val body: String, val slot: Long = 1, val causation: Causation? = null, val headers: Map<String, String> = emptyMap(), val operator: Operator? = null, val status: TimerStatus = TimerStatus.PENDING, val attempts: Int = 0, val outcome: String? = null, val scope: Scope = Scope.NONE, val slotDueAt: Long = dueAt, val skipped: Long = 0)

One schedule of an aggregate: send the command of type commandType, body its JSON, to target each time rule says, the next time dueAt (epoch milliseconds), for its slot, due at slotDueAt.

Link copied to clipboard
class TimerChange @InternalWowApi constructor(val loaded: Timer, val next: Timer)

A change of the timer loaded from the store to next: its next status, slot, slot's due time, skipped slots, due time, attempts or outcome. It applies only while the store holds loaded as loaded (TimerStore.settle).

Link copied to clipboard

The Timer.outcomes the runtime records. A firing's is the value of its observed outcome (me.ahoo.wow.spi.observation.ObservedOutcome), so a timer, its span and its metrics name one outcome alike.

Link copied to clipboard
object Timers

How timers are named and derived from the log.

Link copied to clipboard

Where a Timer is.

Link copied to clipboard
interface TimerStore

The timers of one bounded context's schedules: a view derived from the log, rebuilt by replaying it, never the source of truth. Each aggregate type's timers are kept apart, with its log, and each timer is in its owner's partition (Timer.partition). The built-in timers subscription writes them from the system events wow.ScheduleSet and wow.ScheduleCancelled the aggregates commit. The node's firing loop reads the timers due in the partitions it owns, one query for all of them, sends their commands and records each outcome with settle.