B2BITS FIX Antenna C++ 2.33.0
|
Basic message storage. More...
#include <B2BITS_MsgStorage.h>
Classes | |
struct | RestoreOptions |
Public Types | |
typedef std::vector< StorableMsg * > | FixMsgs |
typedef std::deque< std::string > | OutgoingMessages |
enum | StorageType { PRIMARY_STORAGE = 0 , BACKUP_STORAGE } |
Defines type of the storage. More... | |
Public Member Functions | |
virtual void | clear () |
Clears the storage (removes all messages). | |
StorageType | currentConnectionType () const |
Returns type of the storage. | |
virtual std::string const * | getBaseFilePath () const =0 |
Returns path to the storage without extension. | |
virtual bool | getBoolConfigInfo (const std::string &aKey, bool *aValue) const =0 |
Retrieves configuration information. | |
virtual bool | getConfigInfo (const std::string &aKey, std::string *aValue) const =0 |
Retrieves configuration information. | |
virtual System::u64 | getCreationTime ()=0 |
Returns storage creation time as number of milliseconds sincec Janually 1, 1970. | |
virtual bool | getIntConfigInfo (const std::string &aKey, int *aValue) const =0 |
Retrieves configuration information. | |
virtual int | getMaxSeqNum ()=0 |
Returns the maximum message's sequence number in the storage. | |
virtual int | getMinSeqNum ()=0 |
Returns the minimum message's sequence number in the storage. | |
virtual RejectMsgStorage * | getRejectStorage () |
Return interface to the rejected storage, could be NULL. | |
virtual bool | isClearingSupported () const |
Returns true if the storage supports the cleaning (removing of all messages). | |
virtual bool | isPersistentStorage () const =0 |
Return true if storage is persistent. | |
virtual bool | logLocal (StorableMsg const *apMsg, int nSeqNum, const char *pRawMsg, int size)=0 |
Stores the given outgoing message and then destroys it. | |
virtual bool | logLocal (StorableMsg const *apMsg, int nSeqNum, const std::string &aRawMsg)=0 |
Stores the given outgoing message and then destroys it. | |
virtual void | logRemote (int msgSeqNum, const char *pRawMsg, int size)=0 |
Logs the message from the remote FIX engine. | |
virtual void | logRemote (int msgSeqNum, const std::string &rawMsg)=0 |
Logs the message from the remote FIX engine. | |
virtual void | logRemote (StorableMsgRemote const *apMsg, int msgSeqNum, const char *pRawMsg, int size) |
Logs the message from the remote FIX engine. | |
virtual void | markAsTerminated (bool correctlyTerminated)=0 |
Closes the storage. | |
MsgStorage (StorageType type) | |
Constructor. | |
virtual CacheHolderBase * | prepareLocalRetriving (int beginSeqNum, int endSeqNum, int currentOutSeqNum=INT_MAX, bool filterForResend=true)=0 |
Prepare for cache message walk process like a series of retrieveLocal() calls returns an object whose lifetime is bound to the whole series of retrieveLocal() calls when retrieveLocal() calls are complete, the object should be destroyed by the caller. | |
virtual bool | retrieveLocal (CacheHolderBase *cacheHolder, ParserID parserID, std::vector< FIXMessage * > *apMsgs, int aBeginSeqNum, int aEndSeqNum=0, ProtocolIndex preferredVersion=NA)=0 |
Locates sent messages. | |
virtual bool | retrieveLocal (int outSeqNum, std::string *msg, int currentOutSeqNum=INT_MAX, bool filterForResend=false, CacheHolderBase *cacheHolder=NULL)=0 |
Locates sent message (with seqNum=outSeqNum) and returns it into msg. | |
virtual void | retrieveRemote (ParserID parserID, std::vector< FIXMessage * > *pMessages, const MsgTypes &msgTypes, const std::vector< FixField > &fieldFilter, int beginSeqNum, int endSeqNum=0, ProtocolIndex fixVersion=NA)=0 |
Fills input list with messages that satisfy selection criteria. | |
virtual void | setBoolConfigInfo (const std::string &aKey, bool aValue)=0 |
Sets the configuration information. | |
virtual void | setConfigInfo (const std::string &aKey, const std::string &aValue)=0 |
Sets the configuration information. | |
virtual void | setIntConfigInfo (const std::string &aKey, int aValue)=0 |
Sets the configuration information. | |
virtual void | setLastSentSeqNum (int value)=0 |
Updates MsgSeqNum of outgoing messages. | |
virtual void | setMaxRemoteSeqNum (int msgSeqNum)=0 |
Sets the maximum MsgSeqNum of received messages. | |
virtual void | setMinSeqNum (int msgSeqNum)=0 |
Sets the minimum MsgSeqNum of sended messages. | |
virtual void | setRemoteSeqNum (int msgSeqNum)=0 |
Updates current MsgSeqNum of received messages. | |
virtual | ~MsgStorage () |
Destructor. | |
Protected Member Functions | |
void | clearFixMsgs (FixMsgs &aMsgs) |
Clears collection (delete all its elements). | |
virtual bool | rebuildIndex (const std::string &logPath, const std::string &indexPath, const RestoreOptions &options, unsigned char tagsDelimiter)=0 |
Protected Attributes | |
StorageType | currentConnectionType_ |
Basic message storage.
typedef std::vector<StorableMsg*> Engine::MsgStorage::FixMsgs |
typedef std::deque<std::string> Engine::MsgStorage::OutgoingMessages |
Engine::MsgStorage::MsgStorage | ( | StorageType | type | ) |
Constructor.
|
virtual |
Destructor.
|
inlinevirtual |
Clears the storage (removes all messages).
|
protected |
Clears collection (delete all its elements).
StorageType Engine::MsgStorage::currentConnectionType | ( | ) | const |
Returns type of the storage.
|
pure virtual |
Returns path to the storage without extension.
|
pure virtual |
Retrieves configuration information.
aKey | - parameter key |
aValue | - parameter result value |
|
pure virtual |
Retrieves configuration information.
aKey | - parameter key |
aValue | - parameter result value |
|
pure virtual |
Returns storage creation time as number of milliseconds sincec Janually 1, 1970.
|
pure virtual |
Retrieves configuration information.
aKey | - parameter key |
aValue | - parameter result value |
|
pure virtual |
Returns the maximum message's sequence number in the storage.
|
pure virtual |
Returns the minimum message's sequence number in the storage.
|
virtual |
Return interface to the rejected storage, could be NULL.
|
inlinevirtual |
Returns true if the storage supports the cleaning (removing of all messages).
If false, the clear function leads to the exception.
|
pure virtual |
Return true if storage is persistent.
|
pure virtual |
Stores the given outgoing message and then destroys it.
apMsg | - storage message |
nSeqNum | - message number |
pRawMsg | - message buffer pointer |
size | - message buffer size |
|
pure virtual |
Stores the given outgoing message and then destroys it.
apMsg | - storage message |
nSeqNum | - message number |
aRawMsg | - message buffer |
|
pure virtual |
Logs the message from the remote FIX engine.
msgSeqNum | - message number |
pRawMsg | - message buffer pointer |
size | - message buffer size |
|
pure virtual |
Logs the message from the remote FIX engine.
msgSeqNum | - message number |
rawMsg | - message buffer |
|
inlinevirtual |
Logs the message from the remote FIX engine.
apMsg | - storage message |
msgSeqNum | - message number |
pRawMsg | - message buffer pointer |
size | - message buffer size |
|
pure virtual |
Closes the storage.
|
pure virtual |
Prepare for cache message walk process like a series of retrieveLocal() calls returns an object whose lifetime is bound to the whole series of retrieveLocal() calls when retrieveLocal() calls are complete, the object should be destroyed by the caller.
Returned pointer can have NULL value. To control the lifetime, should be used in conjunction with std::auto_ptr<> The implementaion would typically load the messages from an external storage to memory to prepare for a series of retrieveLocal() calls
beginSeqNum | - begin message number |
endSeqNum | - end message number |
currentOutSeqNum | - number of the current out message to be stored into the storage next time |
filterForResend | - if true load resendable messages only |
|
protectedpure virtual |
|
pure virtual |
Locates sent messages.
cacheHolder | - cache holder | |
parserID | - parser ID | |
[out] | apMsgs | - fix message list, message objects should be destroyed by the caller |
aBeginSeqNum | - begin message number | |
aEndSeqNum | - end message number | |
preferredVersion | - FIX protocol version |
|
pure virtual |
Locates sent message (with seqNum=outSeqNum) and returns it into msg.
[out] | msg | - result message |
currentOutSeqNum | - number of the current out message to be stored into the storage next time | |
filterForResend | - if true load resendable messages only | |
cacheHolder | - cache holder, the holder must be prepared with the same value of the filterForResend parameter |
|
pure virtual |
Fills input list with messages that satisfy selection criteria.
parserID | - unique parser identifier |
pMessages | - result messages list |
msgTypes | - message types filter |
fieldFilter | - message fields filter |
beginSeqNum | - begin message number |
endSeqNum | - end message number |
fixVersion | - FIX protocol version |
|
pure virtual |
Sets the configuration information.
aKey | - parameter key |
aValue | - parameter value |
|
pure virtual |
Sets the configuration information.
aKey | - parameter key |
aValue | - parameter value |
|
pure virtual |
Sets the configuration information.
aKey | - parameter key |
aValue | - parameter value |
|
pure virtual |
Updates MsgSeqNum of outgoing messages.
value | - LastSentSeqNum value |
|
pure virtual |
Sets the maximum MsgSeqNum of received messages.
msgSeqNum | - maximum MsgSeqNum value |
|
pure virtual |
Sets the minimum MsgSeqNum of sended messages.
msgSeqNum | - minimum MsgSeqNum value |
|
pure virtual |
Updates current MsgSeqNum of received messages.
msgSeqNum | - MsgSeqNum value |
|
protected |