addChangeListener abstract method
Adds a listener
to be notified of changes to the status of this
replicator.
Adding a listener
If a Future is returned, the listener will only start listening after the Future has completed. Otherwise the listener is listening immediately after this method returns.
Removing a listener
The returned ListenerToken needs to be provided to removeChangeListener, to remove the given listener. Regardless of whether a Future is returned or not, the listener immediately stops being called.
See also:
- ReplicatorChange for the change event given to
listener
. - addDocumentReplicationListener for listening for DocumentReplications performed by this replicator.
- removeChangeListener for removing a previously added listener.
Implementation
FutureOr<ListenerToken> addChangeListener(ReplicatorChangeListener listener);