Package-level declarations
Types
The state of one rebuild instance: how many rebuild requests it took.
Keeps the snapshot targets of one bounded context in step with the log and the code, on every node, every SnapshotOptions.maintenanceInterval:
The tuning of each context's SnapshotMaintenance: it runs every maintenanceInterval; an in-place rebuild rewrites rebuildPageSize snapshots a page, at most rebuildMaxPages pages a run, under a lease of leaseTtl; a node is a member of its state revision from when it is ready to join until it stops, heartbeated every third of memberTtl whatever its runs take, and stays one for memberTtl after its last heartbeat, so a rollback waits up to that long after the last node of the higher revision is gone (none when it leaves gracefully). A node on standby has its prepare's one heartbeat only: memberTtl after its start, a node of a lower revision rolls its claim back. The snapshot subscriptions write at most writeBatch snapshots of a partition with one me.ahoo.wow.spi.snapshot.SnapshotStore.saveAll. A command's cache miss, and a shared state's, waits at most loadTimeout for a snapshot before it replays the log (me.ahoo.wow.kernel.KernelOptions.snapshotLoadTimeout). With writesInFlight, the subscriptions run that many writes at once over the store's own me.ahoo.wow.spi.snapshot.SnapshotStore.writesInFlight: a seam for measuring the count, bound to no configuration and internal like the constructor; null, the store's. Once the writes follow their backlog it fixes the count, steady and behind alike.
The built-in aggregate that takes a context's snapshot rebuild requests: <context>.snapshot, one instance per snapshotted aggregate type in each tenant, whose id is the aggregate type's name. It belongs to its tenant (no owner), has no lifecycle commands and no snapshots of its own, and decides wow.snapshot.RebuildSnapshot(ids): it commits wow.snapshot.SnapshotRebuildRequested(ids), each id once, which the built-in rebuild subscription (SnapshotMaintenance.REBUILD_SUBSCRIPTION) carries out. A request to an instance that is no snapshotted aggregate type of the context is rejected with FrameworkCodes.COMMAND_INVALID.
Whether the snapshots of an aggregate type are being rebuilt or backfilled: its primary target is not caught up, so a query of them answers with rebuilding; and the store that target's table was removed from under its record (removedFrom), so a query of them is refused.
The built-in wow.snapshot subscription of one bounded context: keeps the latest snapshot of every aggregate of the models given, the aggregate types whose snapshots are enabled. Register subscription in the context's me.ahoo.wow.runtime.subscription.SubscriptionRuntime and give views to the me.ahoo.wow.runtime.Executor: it then runs on each partition's owner, checkpoints, parks and signals like any subscription, and completes the default wait, snapshot (handled(wow.snapshot)). An aggregate type not among models has no snapshot, and its default wait is committed.
What a snapshot subscription's writes (SnapshotWrites) did, from the first SnapshotSubscription.writeCounts on: a diagnostic, which the writes keep only once something reads it.