public class ChronicleQueueStorage extends AbstractFileMessageStorage implements MessageStorage
Modifier and Type | Field and Description |
---|---|
static int |
WAITING_FILE_TO_REMOVE_IN_SEC |
accessFile, channel, configuration, isForcedFlush, maskedTags, NEW_LINE, storageTimestamp
Constructor and Description |
---|
ChronicleQueueStorage(com.epam.fixengine.configuration.Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
appendMessage(byte[] timestampFormatted,
byte[] message)
Appends message to storage with the given formatted timestampFormatted.
|
void |
appendMessage(byte[] timestampFormatted,
byte[] message,
int offset,
int length)
Appends message to storage with the given formatted timestamp.
|
long |
appendMessageInternal(byte[] timestampFormatted,
byte[] message,
int offset,
int length) |
long |
appendMessageInternal(long timestamp,
byte[] message,
int offset,
int length)
Appends message to storage
|
void |
close()
Close the storage.
|
protected void |
deleteFile(String fullPathToStorageFile) |
protected long |
getNextSequenceNumber()
Gets next sequence number.
|
protected void |
openStorageFile() |
void |
retrieveMessages(long from,
long to,
MessageStorageListener listener,
boolean blocking)
Retrieves message from storage.
|
static int |
trimLength(net.openhft.chronicle.bytes.Bytes bytes) |
appendMessage, appendMessage, appendMessageInternal, backupFile, backupStorage, backupStorageFile, deleteStorageFile, getFile, getFormatLength, getPrefixFormat, initialize, initialized, isClosed, openStorage, retrieveMessage, setBackupFileLocator, setFile, setFileLocator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessage, appendMessage, backupStorage, initialize, retrieveMessage
public static final int WAITING_FILE_TO_REMOVE_IN_SEC
public ChronicleQueueStorage(com.epam.fixengine.configuration.Configuration configuration)
public void retrieveMessages(long from, long to, MessageStorageListener listener, boolean blocking) throws IOException
MessageStorage
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 current
thread context, otherwise in the new thread context.IOException
- - if error occurred.MessageStorage.retrieveMessages(long, long, com.epam.fixengine.storage.MessageStorageListener, boolean)
public static int trimLength(net.openhft.chronicle.bytes.Bytes bytes)
protected void openStorageFile() throws IOException
openStorageFile
in class AbstractFileMessageStorage
IOException
protected long getNextSequenceNumber() throws IOException
AbstractFileMessageStorage
getNextSequenceNumber
in class AbstractFileMessageStorage
IOException
- - if I/O error occurredprotected void deleteFile(String fullPathToStorageFile)
deleteFile
in class AbstractFileMessageStorage
public void appendMessage(byte[] timestampFormatted, byte[] message, int offset, int length) throws IOException
MessageStorage
appendMessage
in interface MessageStorage
timestampFormatted
- the message timestampmessage
- the messageoffset
- the initial offsetlength
- the lengthIOException
- - if error occurred.public void appendMessage(byte[] timestampFormatted, byte[] message) throws IOException
MessageStorage
appendMessage
in interface MessageStorage
timestampFormatted
- the message timestampFormattedmessage
- the messageIOException
- - if error occurred.public long appendMessageInternal(byte[] timestampFormatted, byte[] message, int offset, int length) throws IOException
IOException
public long appendMessageInternal(long timestamp, byte[] message, int offset, int length) throws IOException
AbstractFileMessageStorage
appendMessageInternal
in class AbstractFileMessageStorage
timestamp
- the timestamp parametermessage
- the array of byteslength
- @throws IOException - if I/O error occurredIOException
public void close() throws IOException
AbstractFileMessageStorage
close
in interface MessageStorage
close
in class AbstractFileMessageStorage
IOException
- - if I/O error occurredCopyright © 2000–2022 EPAM Systems. All rights reserved.