StoreLayout

class StoreLayout(val log: String, val snapshot: String = log, logs: Map<AggregateType, String> = emptyMap(), snapshots: Map<AggregateType, String> = emptyMap(), copies: Map<AggregateType, String> = emptyMap(), generations: Map<AggregateType, Pair<Int, Int>> = emptyMap())

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 one store, the snapshot store (wow.snapshot.store, the log store by default) unless the snapshots map names another for its type (.snapshot.store); and, when its queries read another store (.query.snapshot.store), a copy of them there, which its own subscription writes. The snapshot store 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(), copies: Map<AggregateType, String> = emptyMap(), generations: Map<AggregateType, Pair<Int, Int>> = emptyMap())

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

The stores some snapshots are on, own or copied.

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 own store and copy.

Link copied to clipboard

The store type's snapshot queries read: its copy's when it has one, else its own.

Link copied to clipboard

Where type's snapshots are written: its own store, and its copy when its queries read another.

Link copied to clipboard

The store of type's own snapshots, which its commands load from and its state reads read.