StoreLayout

class StoreLayout(val log: String, val snapshot: String = log, logs: Map<AggregateType, String> = emptyMap(), snapshots: Map<AggregateType, String> = emptyMap(), placements: Map<AggregateType, SnapshotPlacement> = snapshots.mapValues { SnapshotPlacement(listOf(it.value)) }, val snapshotDefault: SnapshotPlacement = SnapshotPlacement(listOf(snapshot)))

Where each aggregate's log and snapshots are: its log on the store log names (wow.log.store) unless the logs map names another for its type (wow.aggregates.[<context>.<aggregate>].log.store); its snapshots on the stores of its placement (.snapshot.stores, .snapshot.primary), else of snapshotDefault (wow.snapshot.stores, wow.snapshot.primary, the snapshot store alone by default). The snapshot store (the first of wow.snapshot.stores) is each context's default one, whose subscription is wow.snapshot.

Constructors

Link copied to clipboard
constructor(log: String, snapshot: String = log, logs: Map<AggregateType, String> = emptyMap(), snapshots: Map<AggregateType, String> = emptyMap(), placements: Map<AggregateType, SnapshotPlacement> = snapshots.mapValues { SnapshotPlacement(listOf(it.value)) }, snapshotDefault: SnapshotPlacement = SnapshotPlacement(listOf(snapshot)))

Types

Link copied to clipboard

Properties

Link copied to clipboard
val log: String
Link copied to clipboard

The stores some log is on.

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

The stores some snapshots are on.

Functions

Link copied to clipboard

The store of type's log: its log group.

Link copied to clipboard
fun open(context: String, stores: Map<String, Store>, partitions: Int): ContextBackends

The stores of context among stores, each opened as this layout says: its default log group on log, with the checkpoints, leases, failure ledger, reservations and timers of that store; a log group per other store its aggregates' logs are on, with that store's reservations and timers; its snapshot targets, each type's as its placement says.

Link copied to clipboard

Where type's snapshots are written.

Link copied to clipboard

The store of type's snapshots its snapshot queries read: its primary target.