RgaOp

@Serializable
sealed interface RgaOp<out V>

An operation on an Rga sequence.

Operations are immutable, serializable, and carry their own RgaId so they can be delivered in any order and still produce a deterministic sequence.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Compact(val positions: Map<RgaId, RgaId>) : RgaOp<Nothing>

Records that the positions entries have been garbage-collected from the op-log.

Link copied to clipboard
@Serializable
data class Insert<V>(val id: RgaId, val value: V, val after: RgaId) : RgaOp<V>

Insert value with identity id immediately after the element whose id is after (RgaId.HEAD means "insert at the front").

Link copied to clipboard
@Serializable
data class Remove<V>(val id: RgaId) : RgaOp<V>

Tombstone the element with id. Tombstones are retained in the op-log so that future causal references to id remain resolvable.