B2BITS FIX Antenna HFT
1.0.16
|
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. More... | |
StorageType | currentConnectionType () const |
Returns type of the storage. More... | |
virtual std::string const * | getBaseFilePath () const =0 |
Returns path to the storage without extension. More... | |
virtual bool | getBoolConfigInfo (const std::string &aKey, bool *aValue) const =0 |
Retrieves configuration information. More... | |
virtual bool | getConfigInfo (const std::string &aKey, std::string *aValue) const =0 |
Retrieves configuration information. More... | |
virtual int | getInSeqNum () |
virtual bool | getIntConfigInfo (const std::string &aKey, int *aValue) const =0 |
Retrieves configuration information. More... | |
virtual int | getMaxSeqNum ()=0 |
Returns the maximum message's sequence number in the storage. More... | |
virtual int | getMinSeqNum ()=0 |
Returns the minimum message's sequence number in the storage. More... | |
virtual RejectMsgStorage * | getRejectStorage () |
Return interface to the rejected storage, could be NULL. More... | |
virtual System::u64 | getSessionGlobalID () const |
virtual System::u64 | getSessionInternalState () const |
virtual bool | isPersistentStorage () const =0 |
Return true if storage is persistent. More... | |
virtual bool | isStorageCorrupted () const =0 |
Checks if the storage is corrupted. More... | |
virtual bool | logLocal (StorableMsg const *pMsg, const std::string &aRawMsg)=0 |
Stores the given outgoing message and then destroys it. More... | |
virtual bool | logLocal (StorableMsg const *pMsg, const char *pRawMsg, int size)=0 |
Stores the given outgoing message and then destroys it. More... | |
virtual void | logRemote (StorableMsg const *pMsg, const std::string &rawMsg)=0 |
Logs the message from the remote FIX engine. More... | |
virtual void | logRemote (StorableMsg const *pMsg, const char *pRawMsg, int size)=0 |
Logs the message from the remote FIX engine. More... | |
virtual void | markAsTerminated (bool correctlyTerminated)=0 |
Closes the storage. More... | |
MsgStorage (StorageType type) | |
Constructor. More... | |
virtual CacheHolderBase * | prepareLocalRetriving (int beginSeqNum, int endSeqNum, int currentOutSeqNum)=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. More... | |
virtual bool | retrieveLocal (CacheHolderBase *cacheHolder, ProtocolID protocolID, std::vector< FIXMessage * > *apMsgs, int aBeginSeqNum, int aEndSeqNum=0, FIXVersion preferredVersion=NA)=0 |
Locates sent messages. More... | |
virtual bool | retrieveLocal (int outSeqNum, std::string *msg, int currentOutSeqNum)=0 |
Locates sent message (with seqNum=outSeqNum) and returns it into msg. More... | |
virtual void | retrieveRemote (ProtocolID protocolID, std::vector< FIXMessage * > *pMessages, const MsgTypes &msgTypes, const std::vector< FixField > &fieldFilter, int beginSeqNum, int endSeqNum=0, FIXVersion fixVersion=NA)=0 |
Fills input list with messages that satisfy selection criteria. More... | |
virtual void | setBoolConfigInfo (const std::string &aKey, bool aValue)=0 |
Sets the configuration information. More... | |
virtual void | setConfigInfo (const std::string &aKey, const std::string &aValue)=0 |
Sets the configuration information. More... | |
virtual void | setIntConfigInfo (const std::string &aKey, int aValue)=0 |
Sets the configuration information. More... | |
virtual void | setLastSentSeqNum (int value) |
Updates MsgSeqNum of outgoing messages. More... | |
virtual void | setMaxRemoteSeqNum (int msgSeqNum)=0 |
Sets the maximum MsgSeqNum of received messages. More... | |
virtual void | setMinSeqNum (int msgSeqNum)=0 |
Sets the minimum MsgSeqNum of sended messages. More... | |
virtual void | setRemoteSeqNum (int msgSeqNum)=0 |
Updates current MsgSeqNum of received messages. More... | |
virtual void | setSessionInternalState (const System::u64) |
virtual void | syncMessageStorage ()=0 |
virtual | ~MsgStorage () |
Destructor. More... | |
Static Public Attributes | |
static const System::u64 | SessionInternalStateNA = 0 |
Protected Member Functions | |
void | clearFixMsgs (FixMsgs &aMsgs) |
Clears collection (delete all its elements). More... | |
virtual bool | rebuildIndex (const std::string &logPath, const std::string &indexPath, const RestoreOptions &options)=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.
|
virtual |
Clears the storage.
|
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.
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Retrieves configuration information.
aKey | - parameter key |
aValue | - parameter result value |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Retrieves configuration information.
aKey | - parameter key |
aValue | - parameter result value |
Implemented in Engine::B2B_SEALED< FileT >.
|
inlinevirtual |
Reimplemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Retrieves configuration information.
aKey | - parameter key |
aValue | - parameter result value |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Returns the maximum message's sequence number in the storage.
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Returns the minimum message's sequence number in the storage.
Implemented in Engine::B2B_SEALED< FileT >.
|
virtual |
Return interface to the rejected storage, could be NULL.
Reimplemented in Engine::B2B_SEALED< FileT >.
|
inlinevirtual |
Reimplemented in Engine::B2B_SEALED< FileT >.
|
inlinevirtual |
Reimplemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Return true if storage is persistent.
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Checks if the storage is corrupted.
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Stores the given outgoing message and then destroys it.
apMsg | - storage message |
nSeqNum | - message number |
aRawMsg | - message buffer |
Implemented in Engine::B2B_SEALED< FileT >.
|
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 |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Logs the message from the remote FIX engine.
msgSeqNum | - message number param rawMsg - message buffer |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Logs the message from the remote FIX engine.
msgSeqNum | - message number |
pRawMsg | - message buffer pointer |
size | - message buffer size |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Closes the storage.
Implemented in Engine::B2B_SEALED< FileT >.
|
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
Implemented in Engine::B2B_SEALED< FileT >.
|
protectedpure virtual |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Locates sent messages.
cacheHolder | - cache holder | |
protocolID | - protocol ID | |
[out] | apMsgs | - fix message list |
aBeginSeqNum | - begin message number | |
aEndSeqNum | - end message number | |
FIXVersion | - FIX protocol version |
|
pure virtual |
Locates sent message (with seqNum=outSeqNum) and returns it into msg.
[out] | msg | - result message |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Fills input list with messages that satisfy selection criteria.
protocolID | - unique protocol 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 |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Sets the configuration information.
aKey | - parameter key |
aValue | - parameter value |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Sets the configuration information.
aKey | - parameter key |
aValue | - parameter value |
Implemented in Engine::B2B_SEALED< FileT >.
|
virtual |
Updates MsgSeqNum of outgoing messages.
value | - LastSentSeqNum value |
|
pure virtual |
Sets the maximum MsgSeqNum of received messages.
msgSeqNum | - maximum MsgSeqNum value |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Sets the minimum MsgSeqNum of sended messages.
msgSeqNum | - minimum MsgSeqNum value |
Implemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Updates current MsgSeqNum of received messages.
msgSeqNum | - MsgSeqNum value |
Implemented in Engine::B2B_SEALED< FileT >.
|
inlinevirtual |
Reimplemented in Engine::B2B_SEALED< FileT >.
|
pure virtual |
Implemented in Engine::B2B_SEALED< FileT >.
|
protected |
|
static |