OnixS C++ FIX Engine  4.2.0
API Documentation
ISessionStorage Class Referenceabstract

#include <OnixS/FIXEngine/FIX/ISessionStorage.h>

Classes

class  ISessionStorageListener
 
struct  RawMessagePointer
 

Public Member Functions

virtual ~ISessionStorage ()
 
virtual void clear ()=0
 
virtual void close (bool keepSequenceNumbers, bool doBackup)=0
 
virtual void getOutbound (SequenceNumber beginSequenceNumber, SequenceNumber endSequenceNumber, ISessionStorageListener *listener)=0
 
virtual SequenceNumber inSeqNum ()=0
 
virtual void inSeqNum (SequenceNumber messageSequenceNumber)=0
 
virtual void storeInbound (SequenceNumber messageSequenceNumber, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void storeOutbound (const Message &, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void storeOutbound (const SerializedMessage &, SequenceNumber sequenceNumber, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void setSessionTerminationFlag (bool terminated)=0
 
virtual SequenceNumber outSeqNum ()=0
 
virtual void outSeqNum (SequenceNumber messageSequenceNumber)=0
 
virtual void sessionCreationTime (Timestamp timestamp)=0
 
virtual Timestamp sessionCreationTime ()=0
 
virtual void flush ()=0
 
virtual int resendingQueueSize () const =0
 
virtual void resendingQueueSize (int value)=0
 

Detailed Description

Definition at line 32 of file ISessionStorage.h.

Constructor & Destructor Documentation

virtual ~ISessionStorage ( )
inlinevirtual

Destructor.

Definition at line 36 of file ISessionStorage.h.

Member Function Documentation

virtual void clear ( )
pure virtual

Clears the storage.

virtual void close ( bool  keepSequenceNumbers,
bool  doBackup 
)
pure virtual

Closes the storage.

virtual void flush ( )
pure virtual

Flushes all internal buffers.

virtual void getOutbound ( SequenceNumber  beginSequenceNumber,
SequenceNumber  endSequenceNumber,
ISessionStorageListener listener 
)
pure virtual

Gets the messages that have been sent earlier.

Implementation should pass required messages one by one to ISessionStorageListener::onReplayedMessage(const RawMessagePointer& pointer) method. It is possible to omit some or even all messages in requested range, in this case the Engine will automatically generate appropriate SequenceReset-GapFill messages to replace omitted ones.

Parameters
beginSequenceNumberSequence number of first message to resend.
endSequenceNumberSequence number of last message to resend.
listenerRequested messages have to be passed to the interface using ISessionStorageListener::onReplayedMessage method.
Note
FIX Engine/Session Storage does NOT manage the lifetime of this listener.
virtual SequenceNumber inSeqNum ( )
pure virtual

Returns the last inbound sequence number.

virtual void inSeqNum ( SequenceNumber  messageSequenceNumber)
pure virtual

Sets the last inbound sequence number.

virtual SequenceNumber outSeqNum ( )
pure virtual

Returns the last outgoing sequence number.

virtual void outSeqNum ( SequenceNumber  messageSequenceNumber)
pure virtual

Sets the last outgoing sequence number.

virtual int resendingQueueSize ( ) const
pure virtual

Returns the number of sent messages that are available for resending on counterparty's Resend Request <2> message.

virtual void resendingQueueSize ( int  value)
pure virtual

Sets the number of sent messages that are available for resending on counterparty's Resend Request <2> message.

virtual void sessionCreationTime ( Timestamp  timestamp)
pure virtual

Sets session creation time.

Implementation should store timestamp value. This value have to be returned without changes by subsequent ISessionStorage::sessionCreationTime() calls.

Parameters
timestampTimestamp to store in the storage.
virtual Timestamp sessionCreationTime ( )
pure virtual

Returns value stored by ISessionStorage::sessionCreationTime(Timestamp) call.

If the timestamp was never updated the method should return instance of OnixS::FIX::Timestamp class created by default constructor.

Code snippet below illustrate this approach:

virtual Timestamp sessionCreationTime() {
if (!creationTimeUpdated_)
return Timestamp();
/* Return previously stored value. */
}
virtual void setSessionTerminationFlag ( bool  terminated)
pure virtual

Sets the session termination flag.

Parameters
terminatedIf 'true' then the session is terminated and its state information is not needed any more.
virtual void storeInbound ( SequenceNumber  messageSequenceNumber,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given inbound message.

virtual void storeOutbound ( const Message ,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given outgoing message.

virtual void storeOutbound ( const SerializedMessage ,
SequenceNumber  sequenceNumber,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given outgoing message.


The documentation for this class was generated from the following file: