Client
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.
A single-threaded, Closeable is used as default. Therefore you need to close the client, when the client is no longer needed. If you provide your own dispatcher, it is up to you to decide close is needed or not.
Constructors
Types
ClientCondition represents the condition of the client.
DeactivateOptions are user-settable options used when deactivating clients.
User-settable options used when defining Client.
SyncMode defines synchronization modes for the PushPullChanges API.
Functions
Activates this Client. That is, it registers itself to the server and receives a unique ID from the server. The given ID is used to distinguish different clients.
attachChannel attaches the given channel counter to this client. It registers the channel locally; the server is notified by the first RefreshChannel heartbeat, which creates the session and — for a client that never called activateAsync — activates the client lazily.
Changes the sync mode of the document.
Creates a revision snapshot for the given document with the given label and optional description. The document must be attached to this client.
Deactivates this Client.
detachChannel detaches the given channel counter from this client. Cleanup is local-only: heartbeats stop and the server reclaims the session via TTL. No RPC is sent.
Retrieves the revision identified by revisionId for the given document, including its full snapshot. The document must be attached to this client.
Lists revisions for the given document. The document must be attached.
peekChannel reads the current session count of a channel without creating a session on the server. Use this when the caller only needs to display the count (e.g. "N people writing") without contributing to it and without receiving broadcasts.
Removes the given document.
Restores the given document to the state captured by the revision with revisionId. The document must be attached to this client.
Pushes local changes of the attached documents to the server and receives changes of the remote replica from the server then apply them to local documents.