Package org.apache.jackrabbit.oak.spi.state

Examples of org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff


            if (fastEquals(before, state.getChildNode(ROOT))) {
                // use a shortcut when there are no external changes
                builder.setChildNode(ROOT, hook.processCommit(before, after));
            } else {
                // there were some external changes, so do the full rebase
                ConflictAnnotatingRebaseDiff diff =
                        new ConflictAnnotatingRebaseDiff(builder.child(ROOT));
                after.compareAgainstBaseState(before, diff);
                // apply commit hooks on the rebased changes
                builder.setChildNode(ROOT, hook.processCommit(
                        builder.getBaseState().getChildNode(ROOT),
                        builder.getNodeState().getChildNode(ROOT)));
View Full Code Here


        // Rebase branch
        branch.rebase();

        // Rebase in memory changes on top of the head of the rebased branch
        super.reset(branch.getHead());
        head.compareAgainstBaseState(inMemBase, new ConflictAnnotatingRebaseDiff(this));

        // Set new base and return rebased head
        base = branch.getBase();
        return getNodeState();
    }
View Full Code Here

        NodeState base = builder.getBaseState();
        NodeState newBase = getRoot();
        if (base != newBase) {
            ((MemoryNodeBuilder) builder).reset(newBase);
            head.compareAgainstBaseState(
                    base, new ConflictAnnotatingRebaseDiff(builder));
            head = builder.getNodeState();
        }
        return head;
    }
View Full Code Here

        SegmentNodeState before = snb.getBaseState();
        if (!fastEquals(before, root)) {
            SegmentNodeState after = snb.getNodeState();
            snb.reset(root);
            after.compareAgainstBaseState(
                    before, new ConflictAnnotatingRebaseDiff(snb));
        }

        return snb.getNodeState();
    }
View Full Code Here

        // Rebase branch
        branch.rebase();

        // Rebase in memory changes on top of the head of the rebased branch
        super.reset(branch.getHead());
        head.compareAgainstBaseState(inMemBase, new ConflictAnnotatingRebaseDiff(this));

        // Set new base and return rebased head
        base = branch.getBase();
        return getNodeState();
    }
View Full Code Here

        NodeState base = builder.getBaseState();
        NodeState newBase = getRoot();
        if (base != newBase) {
            ((MemoryNodeBuilder) builder).reset(newBase);
            head.compareAgainstBaseState(
                    base, new ConflictAnnotatingRebaseDiff(builder));
            head = builder.getNodeState();
        }
        return head;
    }
View Full Code Here

        SegmentNodeState newBase = store.getHead();
        if (!base.getRecordId().equals(newBase.getRecordId())) {
            NodeBuilder builder = newBase.builder();
            head.getChildNode(ROOT).compareAgainstBaseState(
                    base.getChildNode(ROOT),
                    new ConflictAnnotatingRebaseDiff(builder.child(ROOT)));
            base = newBase;
            head = writer.writeNode(builder.getNodeState());
        }
    }
View Full Code Here

        checkArgument(builder instanceof SegmentNodeBuilder);
        NodeState oldBase = builder.getBaseState();
        if (!SegmentNodeState.fastEquals(oldBase, newBase)) {
            NodeState head = builder.getNodeState();
            ((SegmentNodeBuilder) builder).reset(newBase);
            head.compareAgainstBaseState(oldBase, new ConflictAnnotatingRebaseDiff(builder));
        }
        return builder.getNodeState();
    }
View Full Code Here

        @Override
        void rebase() {
            KernelNodeState root = store.getRoot();
            NodeBuilder builder = root.builder();
            head.compareAgainstBaseState(base, new ConflictAnnotatingRebaseDiff(builder));
            head = builder.getNodeState();
            base = root;
        }
View Full Code Here

        SegmentNodeState before = snb.getBaseState();
        if (!fastEquals(before, root)) {
            SegmentNodeState after = snb.getNodeState();
            snb.reset(root);
            after.compareAgainstBaseState(
                    before, new ConflictAnnotatingRebaseDiff(snb));
        }

        return snb.getNodeState();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.