com.epam.fixengine.storage.file
Class MMFMessageStorage

java.lang.Object
  extended by com.epam.fixengine.storage.file.AbstractFileMessageStorage
      extended by com.epam.fixengine.storage.file.FlatFileMessageStorage
          extended by 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


Field Summary
 
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
 
Fields inherited from class com.epam.fixengine.storage.file.AbstractFileMessageStorage
accessFile, calendar, channel, configuration
 
Constructor Summary
MMFMessageStorage(Configuration config)
           
 
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.FlatFileMessageStorage
getNextSequenceNumber, isEnabledTimestamp, openStorageFile, retrieveMessages, retrieveSequenceNumber
 
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
 

Constructor Detail

MMFMessageStorage

public MMFMessageStorage(Configuration config)
Method Detail

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 parameter
message - the array of bytes
length - @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.