Replicator class Null safety 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
Constructors
Properties
- config → ReplicatorConfiguration
-
This replicator's configuration.
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- isClosed → bool
-
Whether this resource has been closed.
read-only, inherited
-
pendingDocumentIds
→ FutureOr<
Set< String> > -
Returns a
Set
of Document ids, who have revisions pending push. [...]read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
status
→ FutureOr<
ReplicatorStatus> -
Returns this replicator's status.
read-only
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
DocumentReplication
s performed by this replicator. [...] -
isDocumentPending(
String documentId) → FutureOr< bool> -
Returns whether the Document with the given
documentId
has revisions pending push. [...] -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
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) → FutureOr< 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) → SyncReplicator - Creates a replicator for replicating Documents between a local SyncDatabase and a target database.