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.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
-
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: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
-