Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1110

Make NodeStateDiff composable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • core
    • None

    Description

      Currently it is not possible to warp a NodeStateDiff instance into another one for delegation. The problem is that recursion is done by the consumer of the childNodeChanged() call back which causes wrapped NodeStateDiff "to escape". To fix that I propose to separate the concerns of change notification from recursing into a subtree. For this we need an extra method createChildDiff on the NodeStateDiff interface:

          /**
           * Create a {@code NodeStateDiff} for diffing the passed {@code before} and
           * {@code after} states. Returning {@code null} skips comparison for the sub
           * trees rooted at the passed states.
           *
           * @param name  name of the child node
           * @param before  before state of the child node
           * @param after   after state of the child node
           * @return  {@code NodeStateDiff} for the child node
           */
          @CheckForNull
          NodeStateDiff createChildDiff(String name, NodeState before, NodeState after);
      

      Attachments

        1. OAK-1110.patch
          31 kB
          Michael Dürig

        Issue Links

          Activity

            People

              mduerig Michael Dürig
              mduerig Michael Dürig
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: