Interface ISessionStorage
Session's pluggable storage.
Inherited Members
Namespace: OnixS.Cme.ILink3.Storage
Assembly: OnixS.Cme.ILink3.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 |
Negotiated
Session Negotiation status.
Declaration
bool Negotiated { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
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 |
PreviousSeqNum
Declaration
int PreviousSeqNum { get; set; }
Property Value
Type | Description |
---|---|
int |
PreviousUuid
Previous Universally Unique Identifier (UUID).
Declaration
ulong PreviousUuid { get; set; }
Property Value
Type | Description |
---|---|
ulong |
SessionCreationTime
Time when the session attached to the storage was created.
Declaration
DateTime SessionCreationTime { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Type
Declaration
SessionStorageType Type { get; }
Property Value
Type | Description |
---|---|
SessionStorageType |
Uuid
Universally Unique Identifier (UUID).
Declaration
ulong Uuid { get; set; }
Property Value
Type | Description |
---|---|
ulong |
Methods
Clear()
Clears the storage state.
Inbound and outbound sequence numbers are reset to 0.
Declaration
void Clear()
Close(bool)
Closes the storage.
Declaration
void Close(bool doBackup = false)
Parameters
Type | Name | Description |
---|---|---|
bool | doBackup |
Flush()
Flushes all internal buffers.
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)
Returns outbound messages with the specified sequence number interval. Ends are included.
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 |
Exceptions
Type | Condition |
---|---|
ArgumentException | if (beginSeqNum < 0) or ((endSeqNum != 0) and (beginSeqNum > endSeqNum)) |
StoreOutboundMessage(ReadOnlySpan<byte>, int, bool, bool, DateTime)
Stores the given outbound message.
@TODO: check if we still need isOriginal
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 | |
bool | warmUp | Indicates whether it is a warmUp message |
DateTime | timestamp |