| Modifier and Type | Method and Description |
|---|---|
static JournalBuilder |
of(File directory) |
Journal |
open() |
JournalBuilder |
setArchived(File to)
Set the directory used to archive cleaned up log files, also enabling
archiving.
|
JournalBuilder |
setChecksum(Boolean checksum)
Set true to enable records checksum, false otherwise.
|
JournalBuilder |
setDisposeInterval(Long disposeInterval)
Set the milliseconds interval for resources disposal: i.e., un-accessed
files will be closed.
|
JournalBuilder |
setDisposer(ScheduledExecutorService disposer)
Set the ScheduledExecutorService to use for internal resources disposing.
|
JournalBuilder |
setFilePrefix(String filePrefix)
Set the prefix for log files.
|
JournalBuilder |
setFileSuffix(String fileSuffix)
Set the suffix for log files.
|
JournalBuilder |
setMaxFileLength(Integer maxFileLength)
Set the max length of each log file.
|
JournalBuilder |
setMaxWriteBatchSize(Integer maxWriteBatchSize)
Set the max size in bytes of the write batch: must always be equal or
less than the max file length.
|
JournalBuilder |
setPhysicalSync(Boolean physicalSync)
Set true if every disk write must be followed by a physical disk sync,
synchronizing file descriptor properties and flushing hardware buffers,
false otherwise.
|
JournalBuilder |
setRecoveryErrorHandler(RecoveryErrorHandler recoveryErrorHandler)
Set the RecoveryErrorHandler to invoke in case of checksum errors.
|
JournalBuilder |
setReplicationTarget(ReplicationTarget replicationTarget)
Set the
ReplicationTarget to replicate batch writes to. |
JournalBuilder |
setWriter(Executor writer)
Set the Executor to use for writing new record entries.
|
public JournalBuilder setArchived(File to)
public JournalBuilder setChecksum(Boolean checksum)
public JournalBuilder setDisposeInterval(Long disposeInterval)
public JournalBuilder setDisposer(ScheduledExecutorService disposer)
public JournalBuilder setFilePrefix(String filePrefix)
public JournalBuilder setFileSuffix(String fileSuffix)
public JournalBuilder setMaxFileLength(Integer maxFileLength)
public JournalBuilder setMaxWriteBatchSize(Integer maxWriteBatchSize)
public JournalBuilder setPhysicalSync(Boolean physicalSync)
public JournalBuilder setRecoveryErrorHandler(RecoveryErrorHandler recoveryErrorHandler)
public JournalBuilder setReplicationTarget(ReplicationTarget replicationTarget)
ReplicationTarget to replicate batch writes to.public JournalBuilder setWriter(Executor writer)
public Journal open() throws IOException
JournalIOExceptionpublic static JournalBuilder of(File directory)
directory - JournalBuilder using directory as base
directoryCopyright © 2014. All Rights Reserved.