Class JcrLastModifiedConflictHandler
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.commit.DefaultThreeWayConflictHandler
-
- org.apache.jackrabbit.oak.plugins.commit.JcrLastModifiedConflictHandler
-
- All Implemented Interfaces:
ThreeWayConflictHandler
public class JcrLastModifiedConflictHandler extends DefaultThreeWayConflictHandler
Conflict Handler that merges concurrent updates toorg.apache.jackrabbit.JcrConstants.JCR_LASTMODIFIED
by picking the older of the 2 conflicting dates andorg.apache.jackrabbit.JcrConstants.JCR_CREATED
by picking the newer of the 2 conflicting dates.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler
ThreeWayConflictHandler.Resolution
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.plugins.commit.DefaultThreeWayConflictHandler
OURS, THEIRS
-
-
Constructor Summary
Constructors Constructor Description JcrLastModifiedConflictHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ThreeWayConflictHandler.Resolution
addExistingProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState theirs)
The propertyours
has been added toparent
which conflicts with propertytheirs
which has been added in the persistence store.@NotNull ThreeWayConflictHandler.Resolution
changeChangedProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState theirs, @NotNull PropertyState base)
The propertyours
has been changed inparent
while it was also changed to a different value (theirs
) in the persistence store.-
Methods inherited from class org.apache.jackrabbit.oak.plugins.commit.DefaultThreeWayConflictHandler
addExistingNode, changeDeletedNode, changeDeletedProperty, deleteChangedNode, deleteChangedProperty, deleteDeletedNode, deleteDeletedProperty
-
-
-
-
Method Detail
-
addExistingProperty
@NotNull public @NotNull ThreeWayConflictHandler.Resolution addExistingProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState ours, @NotNull @NotNull PropertyState theirs)
Description copied from interface:ThreeWayConflictHandler
The propertyours
has been added toparent
which conflicts with propertytheirs
which has been added in the persistence store.- Specified by:
addExistingProperty
in interfaceThreeWayConflictHandler
- Overrides:
addExistingProperty
in classDefaultThreeWayConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
changeChangedProperty
@NotNull public @NotNull ThreeWayConflictHandler.Resolution changeChangedProperty(@NotNull @NotNull NodeBuilder parent, @NotNull @NotNull PropertyState ours, @NotNull @NotNull PropertyState theirs, @NotNull @NotNull PropertyState base)
Description copied from interface:ThreeWayConflictHandler
The propertyours
has been changed inparent
while it was also changed to a different value (theirs
) in the persistence store.- Specified by:
changeChangedProperty
in interfaceThreeWayConflictHandler
- Overrides:
changeChangedProperty
in classDefaultThreeWayConflictHandler
- Parameters:
parent
- root of the conflictours
- our version of the propertytheirs
- their version of the propertybase
- the base version of the property- Returns:
ThreeWayConflictHandler.Resolution
of the conflict
-
-