Replicator
A replicator for replicating document changes between a local database and a target database. The replicator can be bidirectional or either push or pull. The replicator can also be one-shot or continuous. The replicator runs asynchronously, so observe the status to be notified of progress.
Properties
The replicator's configuration.
Get a best effort set of document IDs in the default collection, that are still pending replication.
The server certificates received from the server during the TLS handshake.
The replicator's current status: its activity level and progress.
Functions
Adds a change listener for the changes in the replication status and progress.
Adds a change listener for the changes in the replication status and progress with a CoroutineContext that will be used to launch coroutines the listener will be called on. Coroutines will be launched in a CoroutineScope that is canceled when the listener is removed.
Adds a change listener for the changes in the replication status and progress with a CoroutineScope that will be used to launch coroutines the listener will be called on. The listener is removed when the scope is canceled.
Adds a document replication event listener.
Adds a document replication event listener with a CoroutineContext that will be used to launch coroutines the listener will be called on. Coroutines will be launched in a CoroutineScope that is canceled when the listener is removed.
Adds a document replication event listener with a CoroutineScope that will be used to launch coroutines the listener will be called on. The listener is removed when the scope is canceled.
A Flow of document replications.
Get a best effort list of documents in the passed collection that are still pending replication.
Best effort check to see if the document whose ID is passed is still pending replication.
Remove the given ReplicatorChangeListener or DocumentReplicationListener from the replicator.
A Flow of replicator state changes.
Start the replicator.
Start the replicator. This method does not wait for the replicator to start. The replicator runs asynchronously and reports its progress through replicator change notifications.