public interface MessageStorage
Modifier and Type | Method and Description |
---|---|
void |
appendMessage(byte[] message)
Appends message to storage.
|
default void |
appendMessage(byte[] timestampFormatted,
byte[] message)
Appends message to storage with the given formatted timestampFormatted.
|
default void |
appendMessage(byte[] timestampFormatted,
byte[] message,
int offset,
int length)
Appends message to storage with the given formatted timestamp.
|
void |
appendMessage(byte[] message,
int offset,
int length)
Appends message to storage.
|
void |
backupStorage(SessionParameters sessionParameters)
Backup the storage.
|
void |
close()
Close the storage.
|
long |
initialize()
Initialize the storage.
|
byte[] |
retrieveMessage(long seqNumber)
Retrieves message from storage.
|
void |
retrieveMessages(long fromSeqNum,
long toSeqNun,
MessageStorageListener listener,
boolean blocking)
Retrieves message from storage.
|
long initialize() throws IOException
IOException
- - if error occurred.void appendMessage(byte[] message, int offset, int length) throws IOException
message
- the messageoffset
- the initial offsetlength
- the lengthIOException
- - if error occurred.void appendMessage(byte[] message) throws IOException
message
- the messageIOException
- - if error occurred.default void appendMessage(byte[] timestampFormatted, byte[] message, int offset, int length) throws IOException
timestampFormatted
- the message timestampmessage
- the messageoffset
- the initial offsetlength
- the lengthIOException
- - if error occurred.default void appendMessage(byte[] timestampFormatted, byte[] message) throws IOException
timestampFormatted
- the message timestampFormattedmessage
- the messageIOException
- - if error occurred.byte[] retrieveMessage(long seqNumber) throws IOException
seqNumber
- the sequence number of messageIOException
- - if error occurred.void retrieveMessages(long fromSeqNum, long toSeqNun, MessageStorageListener listener, boolean blocking) throws IOException
fromSeqNum
- the from sequence numbertoSeqNun
- 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.void close() throws IOException
IOException
- - if error occurred.void backupStorage(SessionParameters sessionParameters) throws IOException
sessionParameters
- the session parametersIOException
Copyright © 2000–2022 EPAM Systems. All rights reserved.