Package org.apache.jackrabbit.oak.plugins.segment

Examples of org.apache.jackrabbit.oak.plugins.segment.Journal


    }

    @Override
    public Journal getJournal(String name) {
        checkArgument("root".equals(name)); // only root supported for now
        return new Journal() {
            @Override
            public RecordId getHead() {
                return head.get();
            }
            @Override
View Full Code Here


        }
    }

    @Override
    public synchronized Journal getJournal(final String name) {
        Journal journal = journals.get(name);
        if (journal == null) {
            journal = new FileJournal(this, "root");
            journals.put(name, journal);
        }
        return journal;
View Full Code Here

    public void close() {
    }

    @Override
    public synchronized Journal getJournal(final String name) {
        Journal journal = journals.get(name);
        if (journal == null) {
            journal = new MemoryJournal(this, "root");
            journals.put(name, journal);
        }
        return journal;
View Full Code Here

    public void close() {
    }

    @Override
    public synchronized Journal getJournal(String name) {
        Journal journal = journals.get(name);
        if (journal == null) {
            journal = new MongoJournal(
                    this, db.getCollection("journals"), concern, name);
            journals.put(name, journal);
        }
View Full Code Here

        }
    }

    @Override
    public synchronized Journal getJournal(final String name) {
        Journal journal = journals.get(name);
        if (journal == null) {
            journal = new FileJournal(this, "root");
            journals.put(name, journal);
        }
        return journal;
View Full Code Here

        checkArgument(!"root".equals(name));

        DBObject id = new BasicDBObject("_id", name);
        state = journals.findOne(id, null, primaryPreferred());
        if (state == null) {
            Journal root = store.getJournal("root");
            String head = root.getHead().toString();
            state = new BasicDBObject(of(
                    "_id",    name,
                    "parent", "root",
                    "base",   head,
                    "head",   head));
View Full Code Here

            RecordId head = RecordId.fromString(state.get("head").toString());

            NodeState before = new SegmentNodeState(store, base);
            NodeState after = new SegmentNodeState(store, head);

            Journal parent = store.getJournal(state.get("parent").toString());
            SegmentWriter writer = new SegmentWriter(store);
            while (!parent.setHead(base, head)) {
                RecordId newBase = parent.getHead();
                NodeBuilder builder =
                        new SegmentNodeState(store, newBase).builder();
                after.compareAgainstBaseState(before, new MergeDiff(builder));
                RecordId newHead =
                        writer.writeNode(builder.getNodeState()).getRecordId();
View Full Code Here

    public void close() {
    }

    @Override
    public synchronized Journal getJournal(String name) {
        Journal journal = journals.get(name);
        if (journal == null) {
            journal = new MongoJournal(
                    this, db.getCollection("journals"), concern, name);
            journals.put(name, journal);
        }
View Full Code Here

    public void close() {
    }

    @Override
    public synchronized Journal getJournal(final String name) {
        Journal journal = journals.get(name);
        if (journal == null) {
            journal = new MemoryJournal(this, "root");
            journals.put(name, journal);
        }
        return journal;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.segment.Journal

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.