Package journal.io.api

Examples of journal.io.api.JournalBuilder


    }

    @Test
    public void api() throws Exception {
        // Create journal and configure some settings:
        JournalBuilder builder = JournalBuilder.of(JOURNAL_DIR)
                .setChecksum(true)
                .setMaxFileLength(1024 * 1024)
                .setMaxWriteBatchSize(1024 * 10);
        // Open the journal:
        Journal journal = builder.open();

        // Write to the journal:
        int iterations = 1000;
        for (int i = 0; i < iterations; i++) {
            Journal.WriteType writeType = i % 2 == 0 ? Journal.WriteType.SYNC : Journal.WriteType.ASYNC;
View Full Code Here

TOP

Related Classes of journal.io.api.JournalBuilder

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.