Class ConflictResolution.WithDocument<T>
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.sync.ConflictResolution
-
- com.mongodb.stitch.core.services.mongodb.remote.sync.ConflictResolution.WithDocument<T>
-
- Type Parameters:
T
- The type of document for this resolution.
- Enclosing class:
- ConflictResolution
public static final class ConflictResolution.WithDocument<T> extends ConflictResolution
ConflictResolution.WithDocument
resolves a conflict by providing a new document that should be treated as the new source of truth.ConflictResolution.WithDocument
is useful for conflict handlers where data from both the local and remote change events are used in resolving the conflict.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mongodb.stitch.core.services.mongodb.remote.sync.ConflictResolution
ConflictResolution.ConflictResolutionType, ConflictResolution.WithDocument<T>
-
-
Method Summary
Modifier and Type Method Description T
getFullDocumentForResolution()
Returns the full document that will be used to resolve the conflict.ConflictResolution.ConflictResolutionType
getType()
Returns the enum type of thisConflictResolution
.-
Methods inherited from class com.mongodb.stitch.core.services.mongodb.remote.sync.ConflictResolution
fromLocal, fromRemote, withDocument
-
-
-
-
Method Detail
-
getType
public ConflictResolution.ConflictResolutionType getType()
Description copied from class:ConflictResolution
Returns the enum type of thisConflictResolution
. For internal use only.- Specified by:
getType
in classConflictResolution
- Returns:
- the type of this
ConflictResolution
-
getFullDocumentForResolution
public T getFullDocumentForResolution()
Returns the full document that will be used to resolve the conflict.- Returns:
- the full document that will be used to resolve the conflict
-
-