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_LASTMODIFIEDby picking the older of the 2 conflicting dates andorg.apache.jackrabbit.JcrConstants.JCR_CREATEDby 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.ResolutionaddExistingProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState theirs)The propertyourshas been added toparentwhich conflicts with propertytheirswhich has been added in the persistence store.@NotNull ThreeWayConflictHandler.ResolutionchangeChangedProperty(@NotNull NodeBuilder parent, @NotNull PropertyState ours, @NotNull PropertyState theirs, @NotNull PropertyState base)The propertyourshas been changed inparentwhile 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:ThreeWayConflictHandlerThe propertyourshas been added toparentwhich conflicts with propertytheirswhich has been added in the persistence store.- Specified by:
addExistingPropertyin interfaceThreeWayConflictHandler- Overrides:
addExistingPropertyin classDefaultThreeWayConflictHandler- Parameters:
parent- root of the conflictours- our version of the propertytheirs- their version of the property- Returns:
ThreeWayConflictHandler.Resolutionof 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:ThreeWayConflictHandlerThe propertyourshas been changed inparentwhile it was also changed to a different value (theirs) in the persistence store.- Specified by:
changeChangedPropertyin interfaceThreeWayConflictHandler- Overrides:
changeChangedPropertyin 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.Resolutionof the conflict
-
-