Package-level declarations

Types

Link copied to clipboard
interface Attachable

Attachable is an interface for resources that can be attached to a client.

Link copied to clipboard
class Client(host: String, options: Client.Options, unaryClient: OkHttpClient = OkHttpClient.Builder() .build(), streamClient: OkHttpClient = OkHttpClient.Builder() .connectTimeout(5, TimeUnit.MINUTES) .readTimeout(0, TimeUnit.MILLISECONDS) .writeTimeout(0, TimeUnit.MILLISECONDS) .callTimeout(0, TimeUnit.MILLISECONDS) .build()) : Closeable

Client that can communicate with the server. It has Documents and sends changes of the documents in local to the server to synchronize with other replicas in remote.

Link copied to clipboard
interface DocStore

A byte-oriented, async storage seam for a dev.yorkie.document.Document's persisted state. Ported from yorkie-js-sdk doc-store.ts (aaa5cb15/#1354), replacing the single-blob shape from 2291bf67/#1338.

Link copied to clipboard
typealias InitialRoot = Map<String, suspend JsonObject.(key: String) -> Unit>

Initializers for missing root keys when attaching a Document.

Link copied to clipboard

Default in-memory DocStore, backed by a ConcurrentHashMap. Ported from yorkie-js-sdk MemoryDocStore (doc-store.ts); matches iOS's memory-only default.

Link copied to clipboard

Default SessionLock: grants every acquire unconditionally. Ported from the non-browser branch of yorkie-js-sdk's WebLocksSessionLock (a no-op outside a browser) and matching iOS's own NoopSessionLock default.

Link copied to clipboard
interface ResourceEvent
Link copied to clipboard

ResourceStatus represents the common status interface for attachable resources.

Link copied to clipboard
data class RevisionSummary(val id: String, val label: String, val description: String, val snapshot: String, val createdAt: Date)

Represents a document revision for version management. Stores a snapshot of document content at a specific point in time, enabling rollback, audit, and version history tracking.

Link copied to clipboard
interface SessionLock

A single-active-session guard for a DocStore-backed document. Ported from yorkie-js-sdk session-lock.ts (2291bf67/#1338). Two sessions concurrently resuming the same persisted document under the same stable actor would mint colliding clientSeq values and silently lose edits, so Client takes a lease named after the document before restoring its persisted envelope.

Link copied to clipboard

A handle to a held SessionLock, returned by a successful SessionLock.acquire. Ported from yorkie-js-sdk session-lock.ts (2291bf67/#1338).

Link copied to clipboard
class StoredChange(val clientSeq: UInt, val bytes: ByteArray)

One persisted local change, tagged with the clientSeq it carries. Ported from yorkie-js-sdk doc-store.ts (aaa5cb15/#1354). The sequence is what lets a store drop changes a sync has already acknowledged, and what lets a restore detect a hole rather than replaying a discontinuous run.

Link copied to clipboard
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).

Link copied to clipboard
data class WatchJobHolder(val key: String, val job: Job)