B2BITS FIX Antenna C++ 2.33.0
|
Manages MsgStorages. More...
#include <B2BITS_StorageMgr.h>
Classes | |
struct | PersistentSessionInfo |
Information about the persistent session. More... | |
Public Types | |
typedef std::list< PersistentSessionInfo > | IncompleteSessionsInfo |
Information about the persistent sessions that were non-gracefully terminated. | |
Public Member Functions | |
virtual MsgStorage * | create (const SessionId &sessionId, FIXVersion version, int outgoingStorageSize, Session::ActiveConnection type=Session::PRIMARY_CONNECTION, const std::string &location="", const std::string &baseFilePath="", unsigned char tagsDelimiter='\x01')=0 |
Creates new MsgStorage object at subFolder. | |
virtual MsgStorage * | create (const std::string &sender, const std::string &target, FIXVersion version, int outgoingStorageSize, Session::ActiveConnection type=Session::PRIMARY_CONNECTION, const std::string &location="", const std::string &baseFilePath="", unsigned char tagsDelimiter='\x01')=0 |
Creates new MsgStorage object at subFolder. | |
virtual MsgStorage * | create (PersistentSessionInfo *info, int outgoingStorageSize)=0 |
Creates new MsgStorage object. | |
virtual bool | existStorage (const SessionId &sessionId, const std::string &primLocation, const std::string &backupLocation, bool *reuse)=0 |
Search for the session's storage and read it. | |
virtual bool | existStorage (const std::string &sender, const std::string &target, const std::string &primLocation, const std::string &backupLocation, bool *reuse)=0 |
Loads information about sessions that were terminated non-gracefully. | |
virtual bool | isPersistent () const =0 |
Returns true if storage is persistent; false otherwise. | |
virtual bool | load (const SessionId &sessionId, const std::string &primLocation, const std::string &backupLocation, PersistentSessionInfo *info)=0 |
Loads information about the session that was terminated non-gracefully. | |
virtual bool | load (const SessionId &sessionId, FIXVersion version, const std::string &primLocation, const std::string &backupLocation, PersistentSessionInfo *info)=0 |
Loads information about the session that was terminated non-gracefully. | |
virtual bool | load (const SessionId &sessionId, FIXVersion version, Session::ActiveConnection type, const std::string &primLocation, const std::string &backupLocation, PersistentSessionInfo *info) |
Loads information about the session that was terminated non-gracefully. | |
virtual bool | load (const std::string &baseFilePath, PersistentSessionInfo *info)=0 |
Loads information about the session that was terminated non-gracefully. | |
virtual bool | load (const std::string &sender, const std::string &target, const std::string &primLocation, const std::string &backupLocation, PersistentSessionInfo *info)=0 |
Loads information about the session that was terminated non-gracefully. | |
virtual bool | load (const std::string &sender, const std::string &target, FIXVersion version, const std::string &primLocation, const std::string &backupLocation, PersistentSessionInfo *info)=0 |
Loads information about the session that was terminated non-gracefully. | |
virtual bool | load (const std::string &sender, const std::string &target, FIXVersion version, Session::ActiveConnection type, const std::string &primLocation, const std::string &backupLocation, PersistentSessionInfo *info) |
Loads information about the session that was terminated non-gracefully. | |
virtual MessageStorageType | type () const =0 |
Return storage type. | |
virtual | ~StorageMgr () |
This destructor is implemented by StorageMgr and used by StorageMgr. | |
Static Public Member Functions | |
static void | destroy () |
Destroys the instance. | |
static void | init () |
Register built-in storage managers. | |
static bool const | isStorageManagerRegistered (std::string const &name) |
Check if the specified storage already registered. | |
static void | registerCustomStorage (StorageMgr *) |
Register storage manager named "custom". | |
static void | registerStorageManager (std::string const &sname, StorageMgr *storageManager) |
Add new storage manager. | |
static StorageMgr * | singleton (const MessageStorageType type) |
Returns the pointer to the instance of StorageMgr. | |
static StorageMgr * | singleton (std::string const &type) |
Returns the pointer to the instance of StorageMgr. | |
static std::vector< std::string > const & | storageManagersNames () |
Get the list of the registered storages. | |
static std::size_t | totalStorageManagers () |
Get the number of registered storages. | |
Protected Member Functions | |
StorageMgr () | |
Manages MsgStorages.
typedef std::list<PersistentSessionInfo> Engine::StorageMgr::IncompleteSessionsInfo |
Information about the persistent sessions that were non-gracefully terminated.
|
virtual |
This destructor is implemented by StorageMgr and used by StorageMgr.
This destructor of StorageMgr implementation is used by "central" StorageMgr registry to deallocate resources previously acquired.
|
protected |
|
pure virtual |
Creates new MsgStorage object at subFolder.
sessionId | - session identifier |
version | - session's version |
outgoingStorageSize | - Specifies size of the transient message storage |
type | - connection type of the storage to create |
location | - path to the folder where files have to be created. When empty - files will be created in the default folder. |
baseFilePath | Path to the storage without etension. if empty, path will be calculated based on sender, target and engine log directory parameters. |
tagsDelimiter | - tags delimiter symbol default value is SOH (0x01) |
|
pure virtual |
Creates new MsgStorage object at subFolder.
sender | - session sender |
target | - session target |
version | - session's version |
outgoingStorageSize | - Specifies size of the transient message storage |
type | - connection type of the storage to create |
location | - path to the folder where files have to be created. When empty - files will be created in the default folder. |
baseFilePath | Path to the storage without extension. if empty, path will be calculated based on sender, target and engine log directory parameters. |
tagsDelimiter | - tags delimiter symbol default value is SOH (0x01) |
|
pure virtual |
Creates new MsgStorage object.
info | - information about the persistent session |
outgoingStorageSize | - Specifies size of the transient message storage |
|
static |
Destroys the instance.
Deallocate resources taken by registered instances of StorageMgr.
|
pure virtual |
Search for the session's storage and read it.
sessionId | - session identifier |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
|
pure virtual |
Loads information about sessions that were terminated non-gracefully.
sender | - session's sender name |
target | - session's target name |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
|
static |
Register built-in storage managers.
FIX Antenna have the number of built-in storages like: persistent, transient, persistentMM, splitPersistent and null. This function performs initialization of storage register and registers all compiled-in storage managers.
|
pure virtual |
Returns true if storage is persistent; false otherwise.
|
static |
Check if the specified storage already registered.
[in] | name | Storage identifier. |
|
pure virtual |
Loads information about the session that was terminated non-gracefully.
sessionId | - session identifier |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
info | - Information about the persistent session |
|
pure virtual |
Loads information about the session that was terminated non-gracefully.
sessionId | - session identifier |
version | - fix protocol version |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
info | - Information about the persistent session |
|
virtual |
Loads information about the session that was terminated non-gracefully.
sessionId | - session identifier |
version | - fix protocol version |
type | - active connection type |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
info | - Information about the persistent session |
|
pure virtual |
Loads information about the session that was terminated non-gracefully.
baseFilePath | Path to the storage without etension |
info | - information about the persistent session |
|
pure virtual |
Loads information about the session that was terminated non-gracefully.
sender | - session's sender name |
target | - session's target name |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
info | - Information about the persistent session |
|
pure virtual |
Loads information about the session that was terminated non-gracefully.
sender | - session's sender name |
target | - session's target name |
version | - fix protocol version |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
info | - Information about the persistent session |
|
virtual |
Loads information about the session that was terminated non-gracefully.
sender | - session's sender name |
target | - session's target name |
version | - fix protocol version |
type | - active connection type |
primLocation | - path to session logs for primary connection |
backupLocation | - path to session logs for backup connection |
info | - Information about the persistent session |
|
static |
Register storage manager named "custom".
This function acquires ownership on the pointer to the storage manager.
Utils::Exception | When the instance of custom storage manager is already registered. |
[in] | Pointer | to the StorageMgr object. |
|
static |
Add new storage manager.
This function acquires ownership on the pointer to the storage manager.
Utils::Exception | When the manager with the specified name is already registered. |
[in] | sname | String identifier of the storage. |
[in] | storageManager | Pointer to the storage instance. |
|
static |
Returns the pointer to the instance of StorageMgr.
Utils::Exception | When the specified storage name is not registered yet. |
|
static |
Returns the pointer to the instance of StorageMgr.
Utils::Exception | When the specified storage name is not registered yet. |
|
static |
Get the list of the registered storages.
The vector contains names of storages in the order of their registration so it's possible to determine the index of the storage in the registry.
|
static |
Get the number of registered storages.
|
pure virtual |
Return storage type.