* @return the newly created an configured Journal instance.
*
* @throws IOException if an error occurs while creating the Journal object.
*/
protected Journal createJournal() throws IOException {
Journal manager = new Journal();
manager.setDirectory(getDirectory());
manager.setMaxFileLength(getJournalMaxFileLength());
manager.setCheckForCorruptionOnStartup(isCheckForCorruptJournalFiles());
manager.setChecksum(isChecksumJournalFiles() || isCheckForCorruptJournalFiles());
manager.setWriteBatchSize(getJournalMaxWriteBatchSize());
manager.setArchiveDataLogs(isArchiveDataLogs());
manager.setSizeAccumulator(journalSize);
manager.setEnableAsyncDiskSync(isEnableJournalDiskSyncs());
if (getDirectoryArchive() != null) {
IOHelper.mkdirs(getDirectoryArchive());
manager.setDirectoryArchive(getDirectoryArchive());
}
return manager;
}