Examples of MemoryJournal


Examples of org.apache.jackrabbit.core.journal.MemoryJournal

     * @param id cluster node id
     * @param records memory journal's list of records
     */
    private ClusterNode createClusterNode(
            String id, ArrayList<MemoryRecord> records) throws Exception {
        final MemoryJournal journal = new MemoryJournal();
        JournalFactory jf = new JournalFactory() {
            public Journal getJournal(NamespaceResolver resolver)
                    throws RepositoryException {
                return journal;
            }
        };
        ClusterConfig cc = new ClusterConfig(id, SYNC_DELAY, jf);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        journal.setRepositoryHome(context.getRepositoryHome());
        journal.init(id, context.getNamespaceResolver());
        if (records != null) {
            journal.setRecords(records);
        }

        ClusterNode clusterNode = new ClusterNode();
        clusterNode.init(context);
        return clusterNode;
View Full Code Here

Examples of org.apache.jackrabbit.core.journal.MemoryJournal

        assertTrue("Double check didn't remove invalid error", checker.getReport().getItems().isEmpty());

    }

    private ClusterNode createClusterNode(String id) throws Exception {
        final MemoryJournal journal = new MemoryJournal() {
            protected boolean syncAgainOnNewRecords() {
                return true;
            }
        };
        JournalFactory jf = new JournalFactory() {
            public Journal getJournal(NamespaceResolver resolver)
                    throws RepositoryException {
                return journal;
            }
        };
        ClusterConfig cc = new ClusterConfig(id, SYNC_DELAY, jf);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        journal.setRepositoryHome(context.getRepositoryHome());
        journal.init(id, context.getNamespaceResolver());
        journal.setRecords(records);

        ClusterNode clusterNode = new ClusterNode();
        clusterNode.init(context);
        return clusterNode;
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.journal.MemoryJournal

     * @param id cluster node id
     * @param records memory journal's list of records
     */
    private ClusterNode createClusterNode(
            String id, ArrayList<MemoryRecord> records) throws Exception {
        final MemoryJournal journal = new MemoryJournal();
        JournalFactory jf = new JournalFactory() {
            public Journal getJournal(NamespaceResolver resolver)
                    throws RepositoryException {
                return journal;
            }
        };
        ClusterConfig cc = new ClusterConfig(id, SYNC_DELAY, jf);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        journal.setRepositoryHome(context.getRepositoryHome());
        journal.init(id, context.getNamespaceResolver());
        if (records != null) {
            journal.setRecords(records);
        }

        ClusterNode clusterNode = new ClusterNode();
        clusterNode.init(context);
        return clusterNode;
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryJournal

        this.index = 0;
        while (loadSegments()) {
            this.index++;
        }

        journals.put("root", new MemoryJournal(this, root));
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryJournal

    @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
Copyright © 2018 www.massapi.com. 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.