public interface ThreeWayConflictHandler
ThreeWayConflictHandler is responsible for handling conflicts which happen
on Root.rebase() and on the implicit rebase operation which
takes part on Root.commit().
This interface contains one method per type of conflict which might occur.
Each of these methods must return a ThreeWayConflictHandler.Resolution for the current conflict.
The resolution indicates to use the changes in the current Root instance
(ThreeWayConflictHandler.Resolution.OURS) or to use the changes from the underlying persistence
store (ThreeWayConflictHandler.Resolution.THEIRS). Alternatively the resolution can also indicate
that the changes have been successfully merged by this ThreeWayConflictHandler
instance (ThreeWayConflictHandler.Resolution.MERGED).| Modifier and Type | Interface and Description |
|---|---|
static class |
ThreeWayConflictHandler.Resolution
Resolutions for conflicts
|
| Modifier and Type | Method and Description |
|---|---|
ThreeWayConflictHandler.Resolution |
addExistingNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState theirs)
The node
ours has been added to parent which conflicts
with node theirs which has been added in the persistence store. |
ThreeWayConflictHandler.Resolution |
addExistingProperty(NodeBuilder parent,
org.apache.jackrabbit.oak.api.PropertyState ours,
org.apache.jackrabbit.oak.api.PropertyState theirs)
The property
ours has been added to parent which conflicts
with property theirs which has been added in the persistence store. |
ThreeWayConflictHandler.Resolution |
changeChangedProperty(NodeBuilder parent,
org.apache.jackrabbit.oak.api.PropertyState ours,
org.apache.jackrabbit.oak.api.PropertyState theirs,
org.apache.jackrabbit.oak.api.PropertyState base)
The property
ours has been changed in parent while it was
also changed to a different value (theirs) in the persistence store. |
ThreeWayConflictHandler.Resolution |
changeDeletedNode(NodeBuilder parent,
String name,
NodeState ours,
NodeState base)
The node
ours has been changed in parent while it was
removed in the persistence store. |
ThreeWayConflictHandler.Resolution |
changeDeletedProperty(NodeBuilder parent,
org.apache.jackrabbit.oak.api.PropertyState ours,
org.apache.jackrabbit.oak.api.PropertyState base)
The property
ours has been changed in parent while it was
removed in the persistence store. |
ThreeWayConflictHandler.Resolution |
deleteChangedNode(NodeBuilder parent,
String name,
NodeState theirs,
NodeState base)
The node
theirs changed in the persistence store while it has been
deleted locally. |
ThreeWayConflictHandler.Resolution |
deleteChangedProperty(NodeBuilder parent,
org.apache.jackrabbit.oak.api.PropertyState theirs,
org.apache.jackrabbit.oak.api.PropertyState base)
The property
theirs changed in the persistence store while it has been
deleted locally. |
ThreeWayConflictHandler.Resolution |
deleteDeletedNode(NodeBuilder parent,
String name,
NodeState base)
The node
name has been removed in parent while it was
also removed in the persistence store. |
ThreeWayConflictHandler.Resolution |
deleteDeletedProperty(NodeBuilder parent,
org.apache.jackrabbit.oak.api.PropertyState base)
The property
ours has been removed in parent while it was
also removed in the persistence store. |
@Nonnull ThreeWayConflictHandler.Resolution addExistingProperty(@Nonnull NodeBuilder parent, @Nonnull org.apache.jackrabbit.oak.api.PropertyState ours, @Nonnull org.apache.jackrabbit.oak.api.PropertyState theirs)
ours has been added to parent which conflicts
with property theirs which has been added in the persistence store.parent - root of the conflictours - our version of the propertytheirs - their version of the propertyThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution changeDeletedProperty(@Nonnull NodeBuilder parent, @Nonnull org.apache.jackrabbit.oak.api.PropertyState ours, @Nonnull org.apache.jackrabbit.oak.api.PropertyState base)
ours has been changed in parent while it was
removed in the persistence store.parent - root of the conflictours - our version of the propertybase - the base version of the propertyThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution changeChangedProperty(@Nonnull NodeBuilder parent, @Nonnull org.apache.jackrabbit.oak.api.PropertyState ours, @Nonnull org.apache.jackrabbit.oak.api.PropertyState theirs, @Nonnull org.apache.jackrabbit.oak.api.PropertyState base)
ours has been changed in parent while it was
also changed to a different value (theirs) in the persistence store.parent - root of the conflictours - our version of the propertytheirs - their version of the propertybase - the base version of the propertyThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution deleteDeletedProperty(@Nonnull NodeBuilder parent, @Nonnull org.apache.jackrabbit.oak.api.PropertyState base)
ours has been removed in parent while it was
also removed in the persistence store.parent - root of the conflictbase - the base version of the propertyThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution deleteChangedProperty(@Nonnull NodeBuilder parent, @Nonnull org.apache.jackrabbit.oak.api.PropertyState theirs, @Nonnull org.apache.jackrabbit.oak.api.PropertyState base)
theirs changed in the persistence store while it has been
deleted locally.parent - root of the conflicttheirs - their version of the propertybase - the base version of the propertyThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution addExistingNode(@Nonnull NodeBuilder parent, @Nonnull String name, @Nonnull NodeState ours, @Nonnull NodeState theirs)
ours has been added to parent which conflicts
with node theirs which has been added in the persistence store.parent - root of the conflictname - name of the nodeours - our version of the nodetheirs - their version of the nodeThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution changeDeletedNode(@Nonnull NodeBuilder parent, @Nonnull String name, @Nonnull NodeState ours, @Nonnull NodeState base)
ours has been changed in parent while it was
removed in the persistence store.parent - root of the conflictname - name of the nodeours - our version of the nodebase - the base version of the nodeThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution deleteChangedNode(@Nonnull NodeBuilder parent, @Nonnull String name, @Nonnull NodeState theirs, @Nonnull NodeState base)
theirs changed in the persistence store while it has been
deleted locally.parent - root of the conflictname - name of the nodetheirs - their version of the nodebase - the base version of the nodeThreeWayConflictHandler.Resolution of the conflict@Nonnull ThreeWayConflictHandler.Resolution deleteDeletedNode(@Nonnull NodeBuilder parent, @Nonnull String name, @Nonnull NodeState base)
name has been removed in parent while it was
also removed in the persistence store.parent - root of the conflictname - name of the nodebase - the base version of the nodeThreeWayConflictHandler.Resolution of the conflictCopyright © 2012–2017 The Apache Software Foundation. All rights reserved.