Manages FileMsgStorages.
More...
#include <FileStorageMgr.h>
|
virtual MsgStorage * | create (const std::string &sender, const std::string &target, FIXVersion ver, System::u64 sessionGlobalID, System::u64 sessionInternalState, int outgoingStorageSize, StorageMgr::PersistentSessionInfo *info, const std::string &location="", const std::string &baseFilePath="") B2B_OVERRIDE |
| Creates new MsgStorage object at subFolder. More...
|
|
virtual MsgStorage * | create (PersistentSessionInfo *info, int outgoingStorageSize) B2B_OVERRIDE |
| Creates new MsgStorage object. More...
|
|
virtual bool | existStorage (const std::string &sender, const std::string &target, bool *reuse) B2B_OVERRIDE |
| Loads information about sessions that were terminated non-gracefully. More...
|
|
virtual bool | load (const std::string &baseFilePath, PersistentSessionInfo *info) |
| Loads information about the session that was terminated non-gracefully. More...
|
|
virtual bool | load (const std::string &sender, const std::string &target, PersistentSessionInfo *info) B2B_OVERRIDE |
| Loads information about the session that was terminated non-gracefully. More...
|
|
virtual bool | load (const std::string &sender, const std::string &target, FIXVersion version, PersistentSessionInfo *info) B2B_OVERRIDE |
| Loads information about the session that was terminated non-gracefully. More...
|
|
virtual bool | load (const std::string &sender, const std::string &target, FIXVersion version, Session::ActiveConnection type, PersistentSessionInfo *info) B2B_OVERRIDE |
| Loads information about the session that was terminated non-gracefully. More...
|
|
virtual MessageStorageType | type () const B2B_OVERRIDE |
| Return storage type. More...
|
|
|
static bool | existStorageF (const std::string &sender, const std::string &target, bool *reuse) |
|
static std::string | getFileName (const std::string &sender, const std::string &target) |
| Returns file's name (without extension). More...
|
|
static bool | loadF (const std::string &sender, const std::string &target, FIXVersion version, PersistentSessionInfo *info) |
|
static bool | loadF (const std::string &baseFilePath, PersistentSessionInfo *info) |
|
static bool | loadF (const std::string &sender, const std::string &target, FIXVersion version, Session::ActiveConnection type, PersistentSessionInfo *info) |
|
static void | destroy () |
| Destroys the instance. More...
|
|
static void | init () |
| Inits the singleton. More...
|
|
static StorageMgr * | singleton (const MessageStorageType type) |
| Returns the pointer to the instance of StorageMgr. More...
|
|
|
void | createStreams (const std::string &sender, const std::string &target, std::string &baseName, FIXVersion ver, System::u64 sessionGlobalID, System::u64 sessionInternalState, FileT &outFile, FileT &outIndexFile, FileT &inFile, FileT &inIndexFile, Utils::FilePropertiesT< System::FileEx > **ppConfigInfo, const std::string &location) |
|
virtual bool | createStreams (const std::string &sender, const std::string &target, const std::string &baseName, FIXVersion ver, System::u64 sessionGlobalID, System::u64 sessionInternalState, FileT &outFile, FileT &outIndexFile, FileT &inFile, FileT &inIndexFile, Utils::FilePropertiesT< System::FileEx > **ppConfigInfo) |
|
| FileStorageMgrT () |
|
virtual void | openStreams (const std::string &sender, const std::string &target, const std::string &baseName, FileT &outFile, FileT &outIndexFile, FileT &inFile, FileT &inIndexFile) |
|
| ~FileStorageMgrT () |
|
| StorageMgr () |
|
virtual | ~StorageMgr () |
|
|
static void | initConfigInfo (Utils::FilePropertiesT< System::FileEx > *pConfigInfo, const std::string &sender, const std::string &target, FIXVersion aVer, System::u64 globalID, System::u64 sessionInternalState) |
|
static bool | loadSessionStateData (const std::string &sender, const std::string &target, const std::string &baseName, details::SessionStateData *info) |
|
static std::auto_ptr
< Utils::FilePropertiesT
< System::FileEx > > | openConfigInfo (const std::string &sender, const std::string &target, const std::string &baseName, const std::string &mode) |
|
template<typename FileT>
class Engine::FileStorageMgrT< FileT >
Manages FileMsgStorages.
Creates new MsgStorage object at subFolder.
- Parameters
-
sender | - session sender |
target | - session target |
version | - session's version |
outgoingStorageSize | - Specifies size of the transient message storage |
location | - path to the folder where files have to be created. When empty - files will be created in log folder. |
baseFilePath | Path to the storage without etension. if empty, path will be calculated based on sender, target and engine log directory parameters. |
- Returns
- new MsgStorage object
Implements Engine::StorageMgr.
Creates new MsgStorage object.
- Parameters
-
info | - information about the persistent session |
outgoingStorageSize | - Specifies size of the transient message storage |
- Returns
- new MsgStorage object
Implements Engine::StorageMgr.
template<typename FileT>
void Engine::FileStorageMgrT< FileT >::createStreams |
( |
const std::string & |
sender, |
|
|
const std::string & |
target, |
|
|
std::string & |
baseName, |
|
|
FIXVersion |
ver, |
|
|
System::u64 |
sessionGlobalID, |
|
|
System::u64 |
sessionInternalState, |
|
|
FileT & |
outFile, |
|
|
FileT & |
outIndexFile, |
|
|
FileT & |
inFile, |
|
|
FileT & |
inIndexFile, |
|
|
Utils::FilePropertiesT< System::FileEx > ** |
ppConfigInfo, |
|
|
const std::string & |
location |
|
) |
| |
|
protected |
template<typename FileT>
virtual bool Engine::FileStorageMgrT< FileT >::createStreams |
( |
const std::string & |
sender, |
|
|
const std::string & |
target, |
|
|
const std::string & |
baseName, |
|
|
FIXVersion |
ver, |
|
|
System::u64 |
sessionGlobalID, |
|
|
System::u64 |
sessionInternalState, |
|
|
FileT & |
outFile, |
|
|
FileT & |
outIndexFile, |
|
|
FileT & |
inFile, |
|
|
FileT & |
inIndexFile, |
|
|
Utils::FilePropertiesT< System::FileEx > ** |
ppConfigInfo |
|
) |
| |
|
protectedvirtual |
template<typename FileT>
virtual bool Engine::FileStorageMgrT< FileT >::existStorage |
( |
const std::string & |
sender, |
|
|
const std::string & |
target, |
|
|
bool * |
reuse |
|
) |
| |
|
virtual |
Loads information about sessions that were terminated non-gracefully.
- Returns
- the number of found sessions. Search for the session's <Sender, Target> storage and read it.
- Parameters
-
sender | - session's sender name |
target | - session's target name |
- Returns
- 'true' if the information was found, otherwise - false.
Implements Engine::StorageMgr.
template<typename FileT>
static bool Engine::FileStorageMgrT< FileT >::existStorageF |
( |
const std::string & |
sender, |
|
|
const std::string & |
target, |
|
|
bool * |
reuse |
|
) |
| |
|
static |
template<typename FileT>
static std::string Engine::FileStorageMgrT< FileT >::getFileName |
( |
const std::string & |
sender, |
|
|
const std::string & |
target |
|
) |
| |
|
inlinestatic |
Returns file's name (without extension).
Loads information about the session that was terminated non-gracefully.
- Parameters
-
baseFilePath | Path to the storage without etension |
info | - information about the persistent session |
- Returns
- 'true' if the information was found, otherwise - false.
Implements Engine::StorageMgr.
Loads information about the session that was terminated non-gracefully.
- Parameters
-
sender | - session's sender name |
target | - session's target name |
info | - Information about the persistent session |
- Returns
- 'true' if the information was found, otherwise - false.
Implements Engine::StorageMgr.
Loads information about the session that was terminated non-gracefully.
- Parameters
-
sender | - session's sender name |
target | - session's target name |
version | - fix protocol version |
info | - Information about the persistent session |
- Returns
- 'true' if the information was found, otherwise - false.
Implements Engine::StorageMgr.
Loads information about the session that was terminated non-gracefully.
- Parameters
-
sender | - session's sender name |
target | - session's target name |
version | - fix protocol version |
type | - active connection type |
info | - Information about the persistent session |
- Returns
- 'true' if the information was found, otherwise - false.
Reimplemented from Engine::StorageMgr.
template<typename FileT>
static bool Engine::FileStorageMgrT< FileT >::loadSessionStateData |
( |
const std::string & |
sender, |
|
|
const std::string & |
target, |
|
|
const std::string & |
baseName, |
|
|
details::SessionStateData * |
info |
|
) |
| |
|
staticprotected |
template<typename FileT>
virtual void Engine::FileStorageMgrT< FileT >::openStreams |
( |
const std::string & |
sender, |
|
|
const std::string & |
target, |
|
|
const std::string & |
baseName, |
|
|
FileT & |
outFile, |
|
|
FileT & |
outIndexFile, |
|
|
FileT & |
inFile, |
|
|
FileT & |
inIndexFile |
|
) |
| |
|
protectedvirtual |