com.epam.fixengine.storage.file
Class SlicedFileMessageStorage
java.lang.Object
com.epam.fixengine.storage.file.AbstractFileMessageStorage
com.epam.fixengine.storage.file.FlatFileMessageStorage
com.epam.fixengine.storage.file.SlicedFileMessageStorage
- All Implemented Interfaces:
- MessageStorage
- Direct Known Subclasses:
- SlicedIndexedMessageStorage
public class SlicedFileMessageStorage
- extends FlatFileMessageStorage
Fields inherited from class com.epam.fixengine.storage.file.FlatFileMessageStorage |
buffer, channelLength, channelPosition, dateFormattedBuffer, DELTA, maxBufferSize, maxStorageGrowSize, NEW_LINE, storageGrowSize, timestamp, timestampsInLogs, WRITE_BUFFER_LENGTH_DEF |
Methods inherited from class com.epam.fixengine.storage.file.AbstractFileMessageStorage |
appendMessage, appendMessage, appendMessageInternal, backupFile, backupStorage, close, deleteFile, getFile, getFormatLength, getPrefixFormat, initialized, isClosed, retrieveMessage, setBackupFileLocator, setFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxFileSize
protected long maxFileSize
fileManager
protected SlicedFileManager fileManager
SlicedFileMessageStorage
public SlicedFileMessageStorage(Configuration config)
initialize
public long initialize()
throws IOException
- Description copied from class:
AbstractFileMessageStorage
- Initialize the storage.
- Specified by:
initialize
in interface MessageStorage
- Overrides:
initialize
in class AbstractFileMessageStorage
- Returns:
- the last sequence number
- Throws:
IOException
- - if I/O error occurred
getMaxFileSize
public long getMaxFileSize()
setMaxFileSize
public void setMaxFileSize(long maxFileSize)
appendMessageInternal
public long appendMessageInternal(long timestamp,
byte[] message,
int offset,
int length)
throws IOException
- Description copied from class:
FlatFileMessageStorage
- Appends message to storage
- Overrides:
appendMessageInternal
in class FlatFileMessageStorage
- Parameters:
timestamp
- the timestamp parametermessage
- the array of byteslength
- @throws IOException - if I/O error occurred
- Throws:
IOException
nextChunk
protected void nextChunk()
throws IOException
- Throws:
IOException
backupStorageFile
protected void backupStorageFile(String fullPathToStorageFile,
String fullPathToDestinationBackupFile)
throws IOException
- Description copied from class:
AbstractFileMessageStorage
- Backups storage file.
- Overrides:
backupStorageFile
in class AbstractFileMessageStorage
- Parameters:
fullPathToStorageFile
- the path to file of in/out filefullPathToDestinationBackupFile
- the destination place to backup file
- Throws:
IOException
deleteStorageFile
protected void deleteStorageFile(String fullPathToStorageFile)
- Description copied from class:
AbstractFileMessageStorage
- Deletes storage file.
- Overrides:
deleteStorageFile
in class AbstractFileMessageStorage
- Parameters:
fullPathToStorageFile
- the path to in/out file
Copyright © 2000-2014 EPAM Systems. All Rights Reserved.