WarpLogRecordExporter

constructor(replica: ReplicaId, store: DurableStore, maxRecords: Int = DEFAULT_MAX_LOG_RECORDS, bufferPolicy: BufferPolicy = BufferPolicy.DROP_OLDEST, segmentOps: Int = DEFAULT_LOG_SEGMENT_OPS, appliedOps: AppliedOpSink = AppliedOpSink.Discarding)

Parameters

replica

The ReplicaId for this device/process. Must be unique and stable across restarts (a UUID is recommended).

store

The DurableStore to persist CRDT state. Use InMemoryDurableStore in tests; wire a platform WAL (JVM file, IndexedDB, etc.) in production.

maxRecords

Maximum number of records buffered in memory before eviction. Defaults to DEFAULT_MAX_LOG_RECORDS.

bufferPolicy

What to do when maxRecords is exceeded. Defaults to BufferPolicy.DROP_OLDEST.

segmentOps

Operations per persisted segment — the ceiling on how many bytes one export rewrites. Pure tuning: smaller writes less per record but keeps more keys. Defaults to DEFAULT_LOG_SEGMENT_OPS.

appliedOps

Where the operations this exporter applies are published — see AppliedOpSink for the contract, including which paths publish and which deliberately do not. Defaults to AppliedOpSink.Discarding. This exporter stays ignorant of what anything does with them.