Class JcrLastModifiedConflictHandler
java.lang.Object
org.apache.jackrabbit.oak.plugins.commit.DefaultThreeWayConflictHandler
org.apache.jackrabbit.oak.plugins.commit.JcrLastModifiedConflictHandler
- All Implemented Interfaces:
ThreeWayConflictHandler
Conflict Handler that merges concurrent updates to
org.apache.jackrabbit.JcrConstants.JCR_LASTMODIFIED by picking the
older of the 2 conflicting dates and
org.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 -
Method Summary
Modifier and TypeMethodDescription@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
-
Constructor Details
-
JcrLastModifiedConflictHandler
public JcrLastModifiedConflictHandler()
-
-
Method Details
-
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
-