Interface ISessionStorage
Session's pluggable storage.
Inherited Members
Namespace: OnixS.Fix.Storage
Assembly: OnixS.Fix.Engine.dll
Syntax
public interface ISessionStorage : IDisposable
Properties
Id
Storage unique id.
Declaration
string Id { get; }
Property Value
Type | Description |
---|---|
string | Unique id |
InSeqNum
Last inbound message sequence number or 0
if no incoming message is stored.
Declaration
int InSeqNum { get; set; }
Property Value
Type | Description |
---|---|
int | Inbound sequence number |
MaxStorageSize
The maximum size of the storage.
Declaration
long MaxStorageSize { get; set; }
Property Value
Type | Description |
---|---|
long | Maximum size of the storage |
MessageMode
Identifies the type of message objects that should be created.
Declaration
MessageMode MessageMode { get; set; }
Property Value
Type | Description |
---|---|
MessageMode |
OutSeqNum
Last outbound sequence number or 0
if no outgoing message is stored.
Declaration
int OutSeqNum { get; set; }
Property Value
Type | Description |
---|---|
int | Outbound sequence number |
SessionCreationTime
Time when the session attached to the storage was created.
Declaration
DateTime SessionCreationTime { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Terminated
Session termination status.
Declaration
bool Terminated { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Type
Declaration
SessionStorageType Type { get; }
Property Value
Type | Description |
---|---|
SessionStorageType |
Methods
Clear()
Clears the storage state.
Inbound and outbound sequence numbers are reset to 0.
Declaration
void Clear()
Close(bool, bool)
Closes the storage.
Declaration
void Close(bool keepSequenceNumbersBetweenFixConnections, bool doBackup = false)
Parameters
Type | Name | Description |
---|---|---|
bool | keepSequenceNumbersBetweenFixConnections | If |
bool | doBackup |
Flush()
Ensures everything stored has been flushed to the persistent storage.
Declaration
void Flush()
GetOutboundMessages(int, int)
Returns outbound messages with the specified sequence number interval. Ends are included.
Declaration
IList<IMessage> GetOutboundMessages(int beginSequenceNumber, int endSequenceNumber)
Parameters
Type | Name | Description |
---|---|---|
int | beginSequenceNumber | the sequence number, to begin with, 0 means the minimum available |
int | endSequenceNumber | the sequence number, to end with, |
Returns
Type | Description |
---|---|
IList<IMessage> | outbound messages |
StoreInboundMessage(ReadOnlySpan<byte>, int, bool)
Stores the given inbound message.
Declaration
void StoreInboundMessage(ReadOnlySpan<byte> rawMessage, int msgSeqNum, bool isOriginal)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | rawMessage | Message to store |
int | msgSeqNum | Message sequence number |
bool | isOriginal |
StoreOutboundMessage(ReadOnlySpan<byte>, int, bool, bool, DateTime)
Stores the given outbound message.
Declaration
void StoreOutboundMessage(ReadOnlySpan<byte> rawMessage, int msgSeqNum, bool isOriginal = true, bool warmUp = false, DateTime timestamp = default)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | rawMessage | Message to store |
int | msgSeqNum | Message sequence number |
bool | isOriginal | Indicates whether a message cam be resent |
bool | warmUp | Indicates whether it is a warmUp message |
DateTime | timestamp |