|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjournal.io.api.JournalBuilder
public class JournalBuilder
A builder style API to create ready to use Journal.
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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
Journal
IOExceptionpublic static JournalBuilder of(File directory)
directory -
JournalBuilder using directory as base
directory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||