Package org.fusesource.hawtjournal.api

Examples of org.fusesource.hawtjournal.api.Journal$WriteCommand


    location.writeExternal(dos);
    return dos.toByteArray();
  }

  public static Journal createJournal(String dirPath, int fileSize, int writeBatchSize) {
    Journal journal = new Journal();
    File directory = new File(dirPath);
    //noinspection ResultOfMethodCallIgnored
    directory.mkdirs();
    journal.setDirectory(directory);
    journal.setMaxFileLength(fileSize);
    journal.setMaxWriteBatchSize(writeBatchSize);

    try {
      journal.open();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    return journal;
  }
View Full Code Here

TOP

Related Classes of org.fusesource.hawtjournal.api.Journal$WriteCommand

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.