Package io.aeron.driver.buffer
Class FileStoreLogFactory
java.lang.Object
io.aeron.driver.buffer.FileStoreLogFactory
- All Implemented Interfaces:
LogFactory,AutoCloseable
Factory for creating
RawLogs in the source publications or publication images directories as appropriate.-
Constructor Summary
ConstructorsConstructorDescriptionFileStoreLogFactory(String dataDirectoryName, int filePageSize, boolean checkStorage, long lowStorageWarningThreshold, ErrorHandler errorHandler, AtomicCounter mappedBytesCounter) Construct aLogFactoryover a file store. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()newImage(long correlationId, int termBufferLength, boolean useSparseFiles) Create newRawLogin the rebuilt publication images directory for the supplied triplet.newPublication(long correlationId, int termBufferLength, boolean useSparseFiles) Create newRawLogin the publications' directory for the supplied triplet.
-
Constructor Details
-
FileStoreLogFactory
public FileStoreLogFactory(String dataDirectoryName, int filePageSize, boolean checkStorage, long lowStorageWarningThreshold, ErrorHandler errorHandler, AtomicCounter mappedBytesCounter) Construct aLogFactoryover a file store.- Parameters:
dataDirectoryName- where the log buffers will be created.filePageSize- of the filesystem.checkStorage- for sufficient space before allocating files.lowStorageWarningThreshold- when warnings about remaining space will begin.errorHandler- to call when an error is encountered.mappedBytesCounter- used to keep track of how many bytes are mapped by the driver.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceLogFactory
-
newPublication
Create newRawLogin the publications' directory for the supplied triplet.- Specified by:
newPublicationin interfaceLogFactory- Parameters:
correlationId- to use to distinguish this publicationtermBufferLength- length of each termuseSparseFiles- for the log buffer.- Returns:
- the newly allocated
RawLog
-
newImage
Create newRawLogin the rebuilt publication images directory for the supplied triplet.- Specified by:
newImagein interfaceLogFactory- Parameters:
correlationId- to use to distinguish this connectiontermBufferLength- to use for the log bufferuseSparseFiles- for the log buffer.- Returns:
- the newly allocated
RawLog
-