Package org.apache.jackrabbit.oak.spi.commit

Examples of org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher


        try {
            this.root = cache.get(kernel.getHeadRevision() + '/');
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        changeDispatcher = new ChangeDispatcher(root);
    }
View Full Code Here


                // no revision read from other cluster nodes
                setHeadRevision(newRevision());
            }
        }
        getRevisionComparator().add(headRevision, Revision.newRevision(0));
        dispatcher = new ChangeDispatcher(getRoot());
        commitQueue = new CommitQueue(this, dispatcher);
        backgroundThread = new Thread(
                new BackgroundOperation(this, isDisposed),
                "MongoNodeStore background thread");
        backgroundThread.setDaemon(true);
View Full Code Here

    public SegmentNodeStore(SegmentStore store, String journal) {
        this.store = store;
        this.journal = store.getJournal(journal);
        this.head = new AtomicReference<SegmentNodeState>(new SegmentNodeState(
                store.getWriter().getDummySegment(), this.journal.getHead()));
        this.changeDispatcher = new ChangeDispatcher(getRoot());
    }
View Full Code Here

public class MongoNodeStoreBranch
        extends AbstractNodeStoreBranch<MongoNodeStore, MongoNodeState> {

    public MongoNodeStoreBranch(MongoNodeStore store,
                                MongoNodeState base) {
        super(store, new ChangeDispatcher(store.getRoot()), base);
    }
View Full Code Here

    private static final int COMMITS_PER_WRITER = 100;

    @Test
    public void concurrentCommits() throws Exception {
        final MongoNodeStore store = new MongoMK.Builder().getNodeStore();
        ChangeDispatcher dispatcher = new ChangeDispatcher(store.getRoot());
        AtomicBoolean running = new AtomicBoolean(true);
        final CommitQueue queue = new CommitQueue(store, dispatcher);
        final List<Exception> exceptions = Collections.synchronizedList(new ArrayList<Exception>());

        Closeable observer = dispatcher.addObserver(new Observer() {
            private Revision before = new Revision(0, 0, store.getClusterId());

            @Override
            public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
                MongoNodeState after = (MongoNodeState) root;
View Full Code Here

    public DocumentNodeStoreBranch(DocumentNodeStore store,
                                   DocumentNodeState base,
                                   ReadWriteLock mergeLock) {
        // maximum back off is twice the async delay, but at least 2 seconds.
        super(store, new ChangeDispatcher(store.getRoot()), mergeLock.readLock(),
                base, Math.max(store.getAsyncDelay(), 1000) * 2);
        this.mergeLock = mergeLock;
    }
View Full Code Here

                // no revision read from other cluster nodes
                setHeadRevision(newRevision());
            }
        }
        getRevisionComparator().add(headRevision, Revision.newRevision(0));
        dispatcher = new ChangeDispatcher(getRoot());
        commitQueue = new CommitQueue(this, dispatcher);
        batchCommitQueue = new BatchCommitQueue(store, revisionComparator);
        backgroundThread = new Thread(
                new BackgroundOperation(this, isDisposed),
                "DocumentNodeStore background thread");
View Full Code Here

        this.store = store;
        this.journal = store.getJournal(journal);
        checkState(this.journal != null);
        this.head = new AtomicReference<SegmentNodeState>(new SegmentNodeState(
                store.getWriter().getDummySegment(), this.journal.getHead()));
        this.changeDispatcher = new ChangeDispatcher(getRoot());
    }
View Full Code Here

        try {
            this.root = cache.get(kernel.getHeadRevision() + '/');
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        changeDispatcher = new ChangeDispatcher(root);
    }
View Full Code Here

                setHeadRevision(newRevision());
            }
        }
        getRevisionComparator().add(headRevision, Revision.newRevision(0));

        dispatcher = new ChangeDispatcher(getRoot());
        commitQueue = new CommitQueue(this, dispatcher);
        batchCommitQueue = new BatchCommitQueue(store, revisionComparator);
        backgroundThread = new Thread(
                new BackgroundOperation(this, isDisposed),
                "DocumentNodeStore background thread");
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher

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.