DotStore

interface DotStore<S : DotStore<S>>

A container of Dots, optionally each carrying a payload. The shapes — DotSet (presence), and later DotFun (dot → value) and DotMap (key → store) — all share the one causal join defined here in spirit; pairing any of them with a DotContext inside a Causal yields a full delta-state CRDT.

Inheritors

Properties

Link copied to clipboard
abstract val dots: Set<Dot>

Every dot currently live in this store.

Link copied to clipboard
abstract val empty: S

The empty (bottom) store of this shape — no dots.

Link copied to clipboard
open val isBottom: Boolean

True when the store holds no dots.

Functions

Link copied to clipboard
abstract fun join(other: S, context: DotContext, otherContext: DotContext): S

The causal join with other. A dot is kept when it is live in both stores, or live in one and not yet witnessed by the other side's context; it is dropped only when one side still has it while the other has it in otherContext but not in its store — the signature of a deliberate remove. context is this store's surrounding causal history; otherContext is the other's.