public interface ConflictResolver
Modifier and Type | Method and Description |
---|---|
DocumentRevision |
resolve(java.lang.String docId,
java.util.List<DocumentRevision> conflicts)
Return resolved
DocumentRevision , the returned DocumentRevision
will be added to the Document tree as the child of the current winner,
and all the other revisions passed in be deleted. |
DocumentRevision resolve(java.lang.String docId, java.util.List<DocumentRevision> conflicts)
Return resolved DocumentRevision
, the returned DocumentRevision
will be added to the Document tree as the child of the current winner,
and all the other revisions passed in be deleted.
Notice if the returned DocumentRevision
is marked as deleted,
the document will be practically deleted since this deleted revision
will be the new winner revision.
If returned DocumentRevision is null, nothing is changed in Database.
docId
- id of the Document with conflictsconflicts
- list of conflicted DocumentRevision, including
current winnerDatastore.resolveConflictsForDocument(String, ConflictResolver)