• Version 1.4.3
Show / Hide Table of Contents

Interface ISessionStorage

Session's pluggable storage.

Inherited Members
IDisposable.Dispose()
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

MaxStorageSize

The maximum size of the storage.

Declaration
long MaxStorageSize { get; set; }
Property Value
Type Description
long

Maximum size of the storage

Negotiated

Session Negotiation status.

Declaration
bool Negotiated { get; set; }
Property Value
Type Description
bool

true if the session has been negotiated successfully, otherwise - false

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

Terminated

Session Termination status.

Declaration
bool Terminated { get; set; }
Property Value
Type Description
bool

true if the logical session that used this storage was terminated and the storage can be cleaned up, otherwise - false

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, bool)

Closes the storage.

Declaration
void Close(bool terminated = false, bool doBackup = false)
Parameters
Type Name Description
bool terminated

If true then the session is terminated and its state information will not be used any more.

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

sequence number to begin with, 0 means the minimum available

int endSequenceNumber

sequence number to end with, 0 means the maximum available

Returns
Type Description
IList<IMessage>

outbound messages

Exceptions
Type Condition
ArgumentException

if (beginSeqNum < 0) or ((endSeqNum != 0) and (beginSeqNum > endSeqNum))

StoreInboundMessage(ReadOnlySpan<byte>, int, bool)

Stores the given inbound message.

@TODO: check if we still need isOriginal

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.

@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
In This Article
Back to top Copyright © Onix Solutions.
Generated by DocFX