public interface SessionStorage
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears session storage state.
|
void |
close(boolean terminated)
Closes session storage.
|
String |
getId()
Returns session storage unique id.
|
long |
getInSeqNum()
Returns last inbound message sequence number or 0 if no inbound message is stored.
|
int |
getMaxStorageSize()
Returns the maximum size of the message storage.
|
List<FixMessage> |
getOutboundMessages(long beginSequenceNumber,
long endSequenceNumber)
Returns outbound messages with the specified sequence number interval.
|
long |
getOutSeqNum()
Returns last outbound sequence number or 0 if no outbound message is stored.
|
boolean |
isTerminated()
Returns the flag whether this storage state should be kept or cleaned.
|
void |
setInSeqNum(long msgSeqNum)
Sets last inbound message sequence number
|
void |
setMaxStorageSize(int maxStorageSize)
Sets the maximum size of the message storage.
|
void |
setOutSeqNum(long msgSeqNum)
Sets last outbound message sequence number.
|
void |
setTerminated(boolean terminated)
Sets the flag whether this storage state should be kept or cleaned
|
void |
storeInboundMessage(ByteBuffer rawMessage,
long msgSeqNum,
boolean isOriginal)
Stores inbound message.
|
void |
storeOutboundMessage(ByteBuffer rawMessage,
long msgSeqNum,
boolean isOriginal,
boolean warmUp)
Stores outbound message.
|
void clear()
void close(boolean terminated)
terminated
set to true means that after closing this session storage can not be restored.
Its state is vanished. The session with the same parameters will be started from scratch.
terminated
set to false means that after closing this session can be restored at some point in the
future. The session state need to be kept - sequence numbers, etc.terminated
- controls whether this session storage state should be kept or cleanedStorageException
- if closing failedList<FixMessage> getOutboundMessages(long beginSequenceNumber, long endSequenceNumber)
beginSequenceNumber
- sequence number to begin with, 0 means the minimum availableendSequenceNumber
- sequence number to end with, 0 means the maximum availableIllegalArgumentException
- if (beginSeqNum < 0) or
((endSeqNum != 0) and (beginSeqNum > endSeqNum))
void storeInboundMessage(ByteBuffer rawMessage, long msgSeqNum, boolean isOriginal)
rawMessage
- message to storemsgSeqNum
- message sequence numberisOriginal
- whether message is original or notStorageException
- if storing failedvoid storeOutboundMessage(ByteBuffer rawMessage, long msgSeqNum, boolean isOriginal, boolean warmUp)
rawMessage
- message to storemsgSeqNum
- message sequence numberisOriginal
- whether message is original or notwarmUp
- indicates whether it is a warmUp messageStorageException
- if storing failedString getId()
long getInSeqNum()
void setInSeqNum(long msgSeqNum)
msgSeqNum
- inbound message sequence numberStorageException
- if set failedlong getOutSeqNum()
void setOutSeqNum(long msgSeqNum)
msgSeqNum
- last outbound message sequence numberStorageException
- if set failedboolean isTerminated()
void setTerminated(boolean terminated)
terminated
- flag whether this storage state should be kept or cleanedStorageException
- if set failedint getMaxStorageSize()
void setMaxStorageSize(int maxStorageSize)
maxStorageSize
- maximum size of the message storageIllegalArgumentException
- if (maxStorageSize < 0)
Copyright © 2005–2024 Onix Solutions. All rights reserved.