public class SlicedFileMessageStorage extends FlatFileMessageStorage
Modifier and Type | Field and Description |
---|---|
protected SlicedFileManager |
fileManager |
protected long |
maxFileSize
The default maximum file size is 100MB.
|
buffer, channelLength, channelPosition, dateFormattedBuffer, DELTA, maxBufferSize, maxStorageGrowSize, storageGrowSize, timestamp, timestampsInLogs, WRITE_BUFFER_LENGTH_DEF
accessFile, channel, configuration, isForcedFlush, maskedTags, NEW_LINE, storageTimestamp
Constructor and Description |
---|
SlicedFileMessageStorage(com.epam.fixengine.configuration.Configuration config) |
Modifier and Type | Method and Description |
---|---|
long |
appendMessageInternal(long timestamp,
byte[] message,
int offset,
int length)
Appends message to storage
|
protected void |
backupStorageFile(String fullPathToStorageFile,
String fullPathToDestinationBackupFile)
Backups storage file.
|
protected void |
deleteStorageFile(String fullPathToStorageFile)
Deletes storage file.
|
long |
getMaxFileSize() |
long |
initialize()
Initialize the storage.
|
protected void |
nextChunk() |
void |
setFile(String file)
Sets the file.
|
void |
setMaxFileSize(long maxFileSize) |
appendMessage, appendMessage, appendMessageInternal, getNextSequenceNumber, isEnabledTimestamp, openStorageFile, retrieveMessages, retrieveSequenceNumber
appendMessage, appendMessage, appendMessageInternal, backupFile, backupStorage, close, deleteFile, getFile, getFormatLength, getPrefixFormat, initialized, isClosed, openStorage, retrieveMessage, setBackupFileLocator, setFileLocator
protected long maxFileSize
protected SlicedFileManager fileManager
public SlicedFileMessageStorage(com.epam.fixengine.configuration.Configuration config)
public long initialize() throws IOException
AbstractFileMessageStorage
initialize
in interface MessageStorage
initialize
in class AbstractFileMessageStorage
IOException
- - if I/O error occurredpublic void setFile(String file)
AbstractFileMessageStorage
setFile
in class AbstractFileMessageStorage
file
- the filepublic long getMaxFileSize()
public void setMaxFileSize(long maxFileSize)
public long appendMessageInternal(long timestamp, byte[] message, int offset, int length) throws IOException
FlatFileMessageStorage
appendMessageInternal
in class FlatFileMessageStorage
timestamp
- the timestamp parametermessage
- the array of byteslength
- @throws IOException - if I/O error occurredIOException
protected void nextChunk() throws IOException
IOException
protected void backupStorageFile(String fullPathToStorageFile, String fullPathToDestinationBackupFile) throws IOException
AbstractFileMessageStorage
backupStorageFile
in class AbstractFileMessageStorage
fullPathToStorageFile
- the path to file of in/out filefullPathToDestinationBackupFile
- the destination place to backup fileIOException
protected void deleteStorageFile(String fullPathToStorageFile)
AbstractFileMessageStorage
deleteStorageFile
in class AbstractFileMessageStorage
fullPathToStorageFile
- the path to in/out fileCopyright © 2000–2022 EPAM Systems. All rights reserved.