Package-level declarations

Types

Link copied to clipboard
class AppendQueueOptions @InternalWowApi constructor(val maxBatch: Int = DEFAULT_MAX_BATCH, val mergers: Int = DEFAULT_MERGERS, val mergeMax: Int = DEFAULT_MERGE_MAX)

How a PartitionAppendQueue groups appends: the most appends one partition's EventLog.appendAll takes (maxBatch). The queue is always on, for every backend (measured 2026-10-23): a group is one statement on PostgreSQL and one insertMany per collection on MongoDB, which carry more under load than single appends and cost a few per cent at low concurrency. These are the backends' constants, not settings.

Link copied to clipboard
class HandoffLog(log: EventLog, context: String, options: HandoffOptions = HandoffOptions(), observer: Observer = Observer.NONE, readBack: (LogEntry) -> Unit = {}) : EventLog

A log whose own commits reach its tails in memory: each stream an append of this node commits is handed, as the entry EventLog.tail would read (its position, the stream and its transport as appended), to the tails of its partition open on this node, so the partition owner's subscriptions do not read back what it has just written.

Link copied to clipboard
class HandoffOptions @InternalWowApi constructor(val capacity: Int = DEFAULT_CAPACITY, val gapWait: Duration = 1.seconds, val probeInterval: Duration = 1.seconds)

How a node hands its own commits to its tails in memory, always: the constants of the hand-off, not settings:

Link copied to clipboard
class PartitionAppendQueue(log: EventLog, options: AppendQueueOptions = AppendQueueOptions(), context: CoroutineContext = Dispatchers.Default, capacity: Int = InFlightLimit.DEFAULT_MAX) : EventLog

The partition owner's append queue: the EventLog the kernel appends through on a node. Appends to one partition from any number of aggregates queue on the partition's lane, and one coroutine per lane commits what is queued with one EventLog.appendAll (group commit). On MongoDB, whose transactions abort each other when two writers bump one partition's counter, this turns contention into batching (about 100 appends a second with 32 concurrent writers on one partition, about 5.6 thousand queued).