Interface ConflictResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ConflictResolver
Custom conflict resolution strategies implement this interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ConflictResolver
    The default conflict resolution strategy.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(Conflict conflict)
    Callback: called when there are conflicting changes in the local and remote versions of a document during replication.
  • Field Details

    • DEFAULT

      static final ConflictResolver DEFAULT
      The default conflict resolution strategy. Deletion always wins. A newer doc always beats an older one. Otherwise one of the two document is chosen randomly but deterministically.
  • Method Details

    • resolve

      @Nullable Document resolve(@NonNull Conflict conflict)
      Callback: called when there are conflicting changes in the local and remote versions of a document during replication.
      Parameters:
      conflict - Description of the conflicting documents.
      Returns:
      the resolved doc.