Package-level declarations

Types

Link copied to clipboard
@Serializable
sealed class BoundedCounterCoordMessage

Wire messages exchanged by BoundedCounterTransferCoordinator instances.

Link copied to clipboard
data class BoundedCounterEqualizerConfig(val cadence: Duration, val minImbalanceThreshold: Long = 0, val random: Random = Random.Default)

Configuration for BoundedCounterTransferCoordinator's proactive background equalizer.

Link copied to clipboard
data class BoundedCounterTransferConfig(val lowWaterThreshold: Long = 0, val requestedAmount: Long = 10, val surplusFloor: Long = 0, val maxRetries: Int = 3, val initialRetryDelay: Duration = 2.seconds)
Link copied to clipboard
class BoundedCounterTransferCoordinator(coordSeam: Seam, state: StateFlow<BoundedCounter>, self: ReplicaId, applyTransfer: (Patch<BoundedCounter>) -> Unit, scope: CoroutineScope, config: BoundedCounterTransferConfig = BoundedCounterTransferConfig(), equalizerConfig: BoundedCounterEqualizerConfig? = null) : AutoCloseable

Coordinator that automatically rebalances BoundedCounter quota across peers over a Seam.

Link copied to clipboard
data class CutFrontier(val stableCut: VersionVector, val frontierMax: VersionVector)

An atomically-published snapshot of the two causal-stability quantities a us.tractat.kuilt.crdt.Rga GC compactor needs (ADR-003 addendum v3, #262).

Link copied to clipboard
fun interface MonotonicMillis

A provider of monotonic time in milliseconds. The default reads from kotlin.time.TimeSource.Monotonic; tests pass a controlled counter.

Link copied to clipboard
class Quilter<S : Quilted<S>>(val replica: ReplicaId, seam: Seam, initial: S, messageSerializer: KSerializer<QuiltMessage<S>>, scope: CoroutineScope, config: QuilterConfig = QuilterConfig(), clock: MonotonicMillis = SystemMonotonicMillis, binaryFormat: BinaryFormat = Cbor, deltaTargets: (Set<PeerId>) -> Set<PeerId> = { it }, random: Random = kotlin.random.Random.Default) : ScopedCloseable

Runs any Quilted CRDT live over a Seam, providing eventually-consistent multi-peer replication via a simple delta-propagation protocol.

Link copied to clipboard
data class QuilterConfig(val evictionAfter: Duration = 5.minutes, val antiEntropyInterval: Duration = 1.minutes, val resendRetryInterval: Duration = 30.seconds, val fullStateRetryInterval: Duration = 30.seconds, val fullStateRetryLimit: Int = 10, val strictTestGuard: Boolean = false, val expectVirtualTime: Boolean = false)

Configuration for Quilter.

Link copied to clipboard
@Serializable
sealed class QuiltMessage<S>

Wire messages exchanged between Quilter instances.

Link copied to clipboard
class RgaGcCoordinator<V>(state: StateFlow<Rga<V>>, cutFrontier: StateFlow<CutFrontier>, delivered: StateFlow<VersionVector>, applyCompaction: (Patch<Rga<V>>) -> Unit, windowPolicy: WindowPolicy = WindowPolicy.never(), scope: CoroutineScope) : ScopedCloseable

Coordinator that drives tombstone GC (and optional history windowing) for an Rga CRDT replicated via Quilter, gated by the eviction-safe causal-stability barrier (ADR-003 addendum v3, #262).

Link copied to clipboard
fun interface WindowPolicy

Policy that decides which element ids to truncate from an us.tractat.kuilt.crdt.Rga sequence.

Functions

Link copied to clipboard
fun <S : Quilted<S>> Quilter(seam: Seam, initial: S, valueSerializer: KSerializer<S>, scope: CoroutineScope, replica: ReplicaId = us.tractat.kuilt.crdt.ReplicaId(seam.selfId.value), config: QuilterConfig = QuilterConfig(), clock: MonotonicMillis = SystemMonotonicMillis, binaryFormat: BinaryFormat = kotlinx.serialization.cbor.Cbor, deltaTargets: (Set<PeerId>) -> Set<PeerId> = { it }, random: Random = kotlin.random.Random.Default): Quilter<S>

Convenience factory for Quilter that derives the message serializer internally.