Stored Doc
class StoredDoc(val snapshot: ByteArray, val meta: ByteArray? = null, val changes: List<StoredChange> = emptyList())
Everything a backend holds for one document: a base snapshot, the changes appended since it, and a small mutable header. Ported from yorkie-js-sdk doc-store.ts (aaa5cb15/#1354).
A plain class, not a data class, for the same api-compat reason as StoredChange.
Parameters
snapshot
a dev.yorkie.document.Document.toBytes envelope.
meta
checkpoint and changeID as of the last sync. Absent until the first one. Held apart from snapshot because a sync has to advance it constantly while the snapshot stays put.
changes
changes appended since snapshot, ascending by StoredChange.clientSeq.
Constructors
Link copied to clipboard
constructor(snapshot: ByteArray, meta: ByteArray? = null, changes: List<StoredChange> = emptyList())