com.epam.fixengine.storage.file
Class MMFMessageStorage
java.lang.Object
com.epam.fixengine.storage.file.AbstractFileMessageStorage
com.epam.fixengine.storage.file.FlatFileMessageStorage
com.epam.fixengine.storage.file.MMFMessageStorage
- All Implemented Interfaces:
- MessageStorage
public class MMFMessageStorage
- extends FlatFileMessageStorage
WARNING: This implementation used class which is Sun proprietary API(HotSpot VM).
User: Mykhailo_Sereda
Date: 07.05.12
Time: 18:34
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 |
Method Summary |
long |
appendMessageInternal(long timestamp,
byte[] message,
int offset,
int length)
Appends message to storage |
void |
close()
Close the storage. |
long |
initialize()
Initialize the storage. |
Methods inherited from class com.epam.fixengine.storage.file.AbstractFileMessageStorage |
appendMessage, appendMessage, appendMessageInternal, backupFile, backupStorage, backupStorageFile, deleteFile, deleteStorageFile, 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 |
MMFMessageStorage
public MMFMessageStorage(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
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
- See Also:
AbstractFileMessageStorage.appendMessageInternal(long, byte[], int, int)
close
public void close()
throws IOException
- Description copied from class:
AbstractFileMessageStorage
- Close the storage.
- Specified by:
close
in interface MessageStorage
- Overrides:
close
in class AbstractFileMessageStorage
- Throws:
IOException
- - if I/O error occurred
Copyright © 2000-2014 EPAM Systems. All Rights Reserved.