SnapshotTargets

class SnapshotTargets(val default: String, val stores: Map<String, SnapshotStore>, placements: Map<AggregateType, SnapshotPlacement> = emptyMap(), val fallback: SnapshotPlacement = SnapshotPlacement(listOf(default)))

The snapshot targets of one bounded context: its snapshot stores by name, and the placement of each aggregate type, fallback for a type that has none: by default the default store alone.

Each store has a built-in subscription of its own, with its own checkpoints, which writes the snapshots of the types it is a target of (subscriptionOf): wow.snapshot for the default store, as before targets, and wow.snapshot:<store> for each other one. A store named so keeps its subscription, and so its checkpoints, whatever the targets list: adding a target to a type, switching its primary or dropping a target moves no checkpoint. The snapshot hop of a wait is the primary target's subscription of the command's aggregate type.

Constructors

Link copied to clipboard
constructor(default: String, stores: Map<String, SnapshotStore>, placements: Map<AggregateType, SnapshotPlacement> = emptyMap(), fallback: SnapshotPlacement = SnapshotPlacement(listOf(default)))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The snapshots each type's primary target keeps: what the kernel and the state readers read.

Link copied to clipboard

Functions

Link copied to clipboard

Where type's snapshots are written.

Link copied to clipboard

The store type's snapshots are read from: its primary target.

Link copied to clipboard

The subscription of type's primary target: the one whose handling ends a wait's snapshot hop.

Link copied to clipboard

The stores that are a target of one of types, each with the types it keeps, in the order of stores.

Link copied to clipboard

The subscription of the store store: wow.snapshot for the default store, wow.snapshot:<store> for another.