Replicator class abstract interface Replication

A replicator for replicating Documents 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 ore continuous. The replicator runs asynchronously, so observe the status to be notified of progress.

Implemented types
Implementers

Properties

config → ReplicatorConfiguration
This replicator's configuration.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether this resource has been closed.
no setterinherited
pendingDocumentIds → FutureOr<Set<String>>
Returns a Set of ids for Documents in the default collection, who have revisions pending to be pushed.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverCertificate → FutureOr<Certificate?>
The TLS Certificate received when connecting to the server.
no setter
status → FutureOr<ReplicatorStatus>
Returns this replicator's status.
no setter

Methods

addChangeListener(ReplicatorChangeListener listener) → FutureOr<ListenerToken>
Adds a listener to be notified of changes to the status of this replicator.
addDocumentReplicationListener(DocumentReplicationListener listener) → FutureOr<ListenerToken>
Adds a listener to be notified of DocumentReplications performed by this replicator.
changes() → Stream<ReplicatorChange>
Returns a Stream to be notified of changes to the status of this replicator.
close() → Future<void>
Closes this resource and frees the resources it uses.
inherited
documentReplications() → Stream<DocumentReplication>
Returns a Stream to be notified of DocumentReplications performed by this replicator.
isDocumentPending(String documentId) → FutureOr<bool>
Returns whether the Document with the given documentId, in the default collection, has revisions pending to be pushed.
isDocumentPendingInCollection(String documentId, Collection collection) → FutureOr<bool>
Returns whether the Document with the given documentId, in the given collection, has revisions pending to be pushed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pendingDocumentIdsInCollection(Collection collection) → FutureOr<Set<String>>
Returns a Set of ids for Documents in the given collection, who have revisions pending to be pushed.
removeChangeListener(ListenerToken token) → FutureOr<void>
Removes a previously added change listener.
start({bool reset = false}) → FutureOr<void>
Starts this replicator with an option to reset the local checkpoint of the replicator.
stop() → FutureOr<void>
Stops this replicator, if running.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

create(ReplicatorConfiguration config) → Future<Replicator>
Creates a replicator for replicating Documents between a local Database and a target database.
createAsync(ReplicatorConfiguration config) → Future<AsyncReplicator>
Creates a replicator for replicating Documents between a local AsyncDatabase and a target database.
createSync(ReplicatorConfiguration config) → Future<SyncReplicator>
Creates a replicator for replicating Documents between a local SyncDatabase and a target database.