Package io.atomix.raft.partition
Class RaftStorageConfig
java.lang.Object
io.atomix.raft.partition.RaftStorageConfig
Raft storage configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theRaftLogFlusher.Factoryto create a new flushing strategy for theRaftLogwhen *is called.invalid reference
io.atomix.raft.storage.RaftStorage#openLog(ThreadContext)longReturns the minimum free disk space buffer to leave when allocating a new segmentintlongReturns the Raft log segment size.booleansetFlusherFactory(RaftLogFlusher.Factory flusherFactory) Sets theRaftLogFlusher.Factoryto create a new flushing strategy for theRaftLogwhenis called.invalid reference
io.atomix.raft.storage.RaftStorage#openLog(ThreadContext)setFreeDiskSpace(long freeDiskSpace) Sets the minimum free disk space buffersetJournalIndexDensity(int journalIndexDensity) voidsetPreallocateSegmentFiles(boolean preallocateSegmentFiles) Sets whether segment files are pre-allocated at creation.setSegmentSize(long segmentSizeBytes) Sets the Raft log segment size.toString()
-
Constructor Details
-
RaftStorageConfig
public RaftStorageConfig()
-
-
Method Details
-
getSegmentSize
public long getSegmentSize()Returns the Raft log segment size.- Returns:
- the Raft log segment size
-
setSegmentSize
Sets the Raft log segment size.- Parameters:
segmentSizeBytes- the Raft log segment size- Returns:
- the partition group configuration
-
flusherFactory
Returns theRaftLogFlusher.Factoryto create a new flushing strategy for theRaftLogwhen *is called.invalid reference
io.atomix.raft.storage.RaftStorage#openLog(ThreadContext)- Returns:
- the flusher factory for this storage
-
setFlusherFactory
Sets theRaftLogFlusher.Factoryto create a new flushing strategy for theRaftLogwhenis called.invalid reference
io.atomix.raft.storage.RaftStorage#openLog(ThreadContext)- Parameters:
flusherFactory- factory to create the flushing strategy for theRaftLog- Returns:
- the Raft partition group configuration
-
getFreeDiskSpace
public long getFreeDiskSpace()Returns the minimum free disk space buffer to leave when allocating a new segment- Returns:
- free disk buffer
-
setFreeDiskSpace
Sets the minimum free disk space buffer- Parameters:
freeDiskSpace-- Returns:
-
getJournalIndexDensity
public int getJournalIndexDensity() -
setJournalIndexDensity
-
isPreallocateSegmentFiles
public boolean isPreallocateSegmentFiles()- Returns:
- true to preallocate segment files, false otherwise
-
setPreallocateSegmentFiles
public void setPreallocateSegmentFiles(boolean preallocateSegmentFiles) Sets whether segment files are pre-allocated at creation. If true, segment files are pre-allocated tosegmentSizeat creation before any writes happen.- Parameters:
preallocateSegmentFiles- true to preallocate files, false otherwise
-
toString
-