Class CountingDiff

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.spi.state.NodeStateDiff

    public class CountingDiff
    extends Object
    implements org.apache.jackrabbit.oak.spi.state.NodeStateDiff
    A NodeStateDiff implementation that counts the differences between two node states, including their sub tree.
    • Constructor Detail

      • CountingDiff

        public CountingDiff()
    • Method Detail

      • countChanges

        public static int countChanges​(org.apache.jackrabbit.oak.spi.state.NodeState before,
                                       org.apache.jackrabbit.oak.spi.state.NodeState after)
      • propertyAdded

        public boolean propertyAdded​(org.apache.jackrabbit.oak.api.PropertyState after)
        Specified by:
        propertyAdded in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
      • propertyChanged

        public boolean propertyChanged​(org.apache.jackrabbit.oak.api.PropertyState before,
                                       org.apache.jackrabbit.oak.api.PropertyState after)
        Specified by:
        propertyChanged in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
      • propertyDeleted

        public boolean propertyDeleted​(org.apache.jackrabbit.oak.api.PropertyState before)
        Specified by:
        propertyDeleted in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
      • childNodeAdded

        public boolean childNodeAdded​(String name,
                                      org.apache.jackrabbit.oak.spi.state.NodeState after)
        Specified by:
        childNodeAdded in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
      • childNodeChanged

        public boolean childNodeChanged​(String name,
                                        org.apache.jackrabbit.oak.spi.state.NodeState before,
                                        org.apache.jackrabbit.oak.spi.state.NodeState after)
        Specified by:
        childNodeChanged in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
      • childNodeDeleted

        public boolean childNodeDeleted​(String name,
                                        org.apache.jackrabbit.oak.spi.state.NodeState before)
        Specified by:
        childNodeDeleted in interface org.apache.jackrabbit.oak.spi.state.NodeStateDiff
      • getNumChanges

        public int getNumChanges()