|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.fixengine.storage.file.AbstractFileMessageStorage com.epam.fixengine.storage.file.FlatFileMessageStorage
public class FlatFileMessageStorage
File message storage implementation.
Field Summary | |
---|---|
protected ByteBuffer |
buffer
|
protected long |
channelLength
|
protected long |
channelPosition
|
protected byte[] |
dateFormattedBuffer
|
protected static long |
DELTA
|
protected int |
maxBufferSize
|
protected int |
maxStorageGrowSize
|
protected static byte[] |
NEW_LINE
|
protected boolean |
storageGrowSize
|
protected long |
timestamp
|
protected boolean |
timestampsInLogs
|
protected static int |
WRITE_BUFFER_LENGTH_DEF
|
Fields inherited from class com.epam.fixengine.storage.file.AbstractFileMessageStorage |
---|
accessFile, calendar, channel, configuration |
Constructor Summary | |
---|---|
FlatFileMessageStorage()
Deprecated. |
|
FlatFileMessageStorage(Configuration config)
|
Method Summary | |
---|---|
long |
appendMessageInternal(long timestamp,
byte[] message,
int offset,
int length)
Appends message to storage |
protected long |
getNextSequenceNumber()
Gets next sequence number. |
boolean |
isEnabledTimestamp()
|
protected void |
openStorageFile()
|
void |
retrieveMessages(long from,
long to,
MessageStorageListener listener,
boolean blocking)
The method retrieveMessages is not supported in this instance. |
static long |
retrieveSequenceNumber(String fileName)
Retrieves the last sequence number. |
Methods inherited from class com.epam.fixengine.storage.file.AbstractFileMessageStorage |
---|
appendMessage, appendMessage, appendMessageInternal, backupFile, backupStorage, backupStorageFile, close, deleteFile, deleteStorageFile, getFile, getFormatLength, getPrefixFormat, initialize, initialized, isClosed, retrieveMessage, setBackupFileLocator, setFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final long DELTA
protected static final byte[] NEW_LINE
protected static final int WRITE_BUFFER_LENGTH_DEF
protected byte[] dateFormattedBuffer
protected ByteBuffer buffer
protected int maxBufferSize
protected long timestamp
protected boolean timestampsInLogs
protected int maxStorageGrowSize
protected boolean storageGrowSize
protected long channelPosition
protected long channelLength
Constructor Detail |
---|
@Deprecated public FlatFileMessageStorage()
FlatFileMessageStorage
.
public FlatFileMessageStorage(Configuration config)
Method Detail |
---|
protected void openStorageFile() throws IOException
openStorageFile
in class AbstractFileMessageStorage
IOException
public void retrieveMessages(long from, long to, MessageStorageListener listener, boolean blocking) throws IOException
retrieveMessages
is not supported in this instance.
retrieveMessages
in interface MessageStorage
retrieveMessages
in class AbstractFileMessageStorage
from
- the from sequence numberto
- the to sequence numberlistener
- the callback listenerblocking
- if parameter is true, the execution start in currentUnsupportedOperationException
IOException
- - if error occurred.AbstractFileMessageStorage.retrieveMessages(long, long, com.epam.fixengine.storage.MessageStorageListener, boolean)
protected long getNextSequenceNumber() throws IOException
AbstractFileMessageStorage
getNextSequenceNumber
in class AbstractFileMessageStorage
IOException
- - if I/O error occurredpublic long appendMessageInternal(long timestamp, byte[] message, int offset, int length) throws IOException
appendMessageInternal
in class AbstractFileMessageStorage
timestamp
- the timestamp parametermessage
- the array of bytesoffset
- length
- @throws IOException - if I/O error occurred
IOException
public boolean isEnabledTimestamp()
public static long retrieveSequenceNumber(String fileName) throws IOException
fileName
- the file name
IOException
- - if I/O error occurred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |