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

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


    public static void restore(NodeState source, NodeStore store)
            throws CommitFailedException {
        long s = System.currentTimeMillis();
        NodeState after = store.getRoot();
        NodeBuilder builder = after.builder();
        source.compareAgainstBaseState(after, new ApplyDiff(builder));
        store.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
        log.debug("Restore finished in {} ms.", System.currentTimeMillis() - s);
    }
View Full Code Here


                    // so use the backed up state as the basis of the
                    // incremental backup diff
                    before = state.getChildNode("root");
                }
                current.compareAgainstBaseState(
                        before, new ApplyDiff(builder.child("root")));
            }
            builder.setProperty("checkpoint", checkpoint);

            // 4. commit the backup
            backup.setHead(state, builder.getNodeState());
View Full Code Here

        BuiltInNodeTypes.register(new SystemRoot(
                store, new EditorHook(new CompositeEditorProvider(
                        new NamespaceEditorProvider(),
                        new TypeEditorProvider()))));
        NodeState target = store.getRoot();
        target.compareAgainstBaseState(base, new ApplyDiff(builder));
    }
View Full Code Here

                    // so use the backed up state as the basis of the
                    // incremental backup diff
                    before = state.getChildNode("root");
                }
                current.compareAgainstBaseState(
                        before, new ApplyDiff(builder.child("root")));
            }
            builder.setProperty("checkpoint", checkpoint);

            // 4. commit the backup
            journal.setHead(
View Full Code Here

        NodeStore store = new MemoryNodeStore(base);
        BuiltInNodeTypes.register(new SystemRoot(store, new EditorHook(
                new CompositeEditorProvider(new NamespaceEditorProvider(),
                        new RegistrationEditorProvider()))));
        NodeState target = store.getRoot();
        target.compareAgainstBaseState(base, new ApplyDiff(builder));
    }
View Full Code Here

TOP

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

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.