GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloManager.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLODBMANAGER_H
2#define INC_GLODBMANAGER_H
3//-----------------------------------------------------------------------------
50//-----------------------------------------------------------------------------
51#include "GloTypes.h"
52#include "GloOrderMsg.h"
53#include <string>
54#if defined (__PTHREADS)
55 #include <EuPCriticalSection.h>
56#else
57 #include "EuCriticalSection.h"
58#endif
59#include "PtlTDVList.h"
61#include "GloTransactionOwner.h"
64#include "GloTransactionOwner.h"
65#if defined (__PTHREADS)
66 #include <EuEndlessPThread.h>
67 #include <semaphore.h>
68#else
69 #include "EuRepeatingThread.h"
70#endif
71#include <vector>
72#include <map>
73#include <queue>
74#include <fstream>
75#include "TcpSocketTypes.h"
76//-----------------------------------------------------------------------------
77namespace glo
78{
79 //---------------------------------------------------------------------------
80 /* Forwards */
82 class Communicator;
83 class LockManager;
85 class ObjID;
86 class RealIndexPool;
87 class Record;
88 class SchemaInterface;
89 class Server;
94 struct ClientInfo;
95 class IndexPool;
96 //---------------------------------------------------------------------------
97 #ifdef _MSC_VER
98 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
99 #pragma warning( disable : 4251 )
100 #endif
101 //---------------------------------------------------------------------------
171 #if defined (__PTHREADS)
172 class __glo_export_dll Manager : public EuEndlessPThread
173 #else
175 #endif
176 {
177 private:
178 //============== Friends
179 //-----------------------------------------------------------------------
180 friend class WatchNotifyManager;
181 friend class LockManager;
182 friend class OrderMsg;
183 friend class TcpServerReceiver;
185 //-----------------------------------------------------------------------
186
187 protected:
188 //-----------------------------------------------------------------------
189 // >>>>>>>>>>>>>>>>>>>>>>>> Receiver >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
190 //-----------------------------------------------------------------------
208 {
209 private:
210 //============== Attribute
211 //---------------------------------------------------------------------
229 unsigned int m_uiRefCounter;
230 //---------------------------------------------------------------------
242 std::string m_sSchemaName;
243 //---------------------------------------------------------------------
254 //---------------------------------------------------------------------
265 //---------------------------------------------------------------------
266
267 //============= Konstruktor
268 //---------------------------------------------------------------------
279 //---------------------------------------------------------------------
289 Receiver( const Receiver & );
290 //---------------------------------------------------------------------
291
292 public:
293 //============== De- und Konstruktoren
294 //---------------------------------------------------------------------
318 Receiver( const std::string & sSchemaName,
319 CommunicaterThread * pCommunicatorThread,
320 Communicator * pCommunicator );
321 //---------------------------------------------------------------------
332 //---------------------------------------------------------------------
333
334 public:
335 //============== Methoden
336 //---------------------------------------------------------------------
350 std::string getSchemaName() const;
351 //---------------------------------------------------------------------
364 //---------------------------------------------------------------------
381 //---------------------------------------------------------------------
393 unsigned int incrementRefCounter();
394 //---------------------------------------------------------------------
406 unsigned int decrementRefCounter();
407 //---------------------------------------------------------------------
408
409 private:
410 //============== Operatoren
411 //---------------------------------------------------------------------
421 Manager::Receiver & operator= ( const Receiver & );
422 //---------------------------------------------------------------------
423 };
424 //-----------------------------------------------------------------------
425 // <<<<<<<<<<<<<<<<<<<<<<<< Receiver <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
426 //-----------------------------------------------------------------------
427
428 protected:
429 //-----------------------------------------------------------------------
430 // >>>>>>>>>>>>>>>>>>>>> ObjIdWithDepends >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
431 //-----------------------------------------------------------------------
432 // doxygen -> warning: unable to resolve reference to 'GLO_REF_DEPENDENT' for \ref command
433 // Is a reference to the GlobalObjects documentation.
434 //-----------------------------------------------------------------------
452 {
453 public:
454 //============== Attribute
455 //---------------------------------------------------------------------
466 //---------------------------------------------------------------------
467 // doxygen -> warning: unable to resolve reference to 'GLO_REF_DEPENDENT' for \ref command
468 // Is a reference to the GlobalObjects documentation.
469 //---------------------------------------------------------------------
481 std::map< ObjID, Record *, std::less<ObjID> > * m_pDependRecordMap;
482 //---------------------------------------------------------------------
483
484 //============== Konstruktoren
485 //---------------------------------------------------------------------
486 // doxygen -> warning: unable to resolve reference to 'GLO_REF_DEPENDENT' for \ref command
487 // Is a reference to the GlobalObjects documentation.
488 //---------------------------------------------------------------------
513 ObjIdWithDepends( const ObjID & rObjID,
514 std::map< ObjID, Record *, std::less<ObjID> > * pDependRecordMap );
515 //---------------------------------------------------------------------
528 //---------------------------------------------------------------------
529 };
530 //-----------------------------------------------------------------------
531 // <<<<<<<<<<<<<<<<<<<<< ObjIdWithDepends <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
532 //-----------------------------------------------------------------------
533
534 //-----------------------------------------------------------------------
535 // >>>>>>>>>>>>>>>>>>>>>> SchemaMapItem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
536 //-----------------------------------------------------------------------
552 {
553 private:
554 //+ ============ Attribute
555 //---------------------------------------------------------------------
569 unsigned int m_uiCounter;
570 //---------------------------------------------------------------------
581 //---------------------------------------------------------------------
592 //---------------------------------------------------------------------
593 #if defined(_MSC_VER)
594 //---------------------------------------------------------------------
607 std::ofstream * m_pLockFile;
608 //---------------------------------------------------------------------
609 #elif defined(__MINGW32__) || defined(__MINGW64__)
610 //---------------------------------------------------------------------
623 void * m_hLockFileHandle;
624 //---------------------------------------------------------------------
625 #elif defined(__GNUC__)
626 //---------------------------------------------------------------------
639 int m_iLockFileHandle;
640 //---------------------------------------------------------------------
641 #endif
642 //---------------------------------------------------------------------
643
644 protected:
645 //============= Konstruktor
646 //---------------------------------------------------------------------
657 //---------------------------------------------------------------------
658
659 public:
660 //============== De- und Konstruktoren
661 //---------------------------------------------------------------------
662 #if defined(_MSC_VER)
663 //---------------------------------------------------------------------
695 RealIndexPool * pRealIndexPool,
696 std::ofstream * pLockFile );
697 //---------------------------------------------------------------------
698 #elif defined(__MINGW32__) || defined(__MINGW64__)
699 //---------------------------------------------------------------------
732 RealIndexPool * pRealIndexPool,
733 void * hLockFileHandle );
734 //---------------------------------------------------------------------
735 #elif defined(__GNUC__)
736 //---------------------------------------------------------------------
769 RealIndexPool * pRealIndexPool,
770 int iLockFileHandle );
771 //---------------------------------------------------------------------
772 #endif
773 //---------------------------------------------------------------------
774 #if defined(_MSC_VER)
785 #elif defined(__MINGW32__) || defined(__MINGW64__)
796 #elif defined(__GNUC__)
807 #endif
809 //---------------------------------------------------------------------
810
811 private:
812 //============== Konstruktoren
813 //---------------------------------------------------------------------
824 //---------------------------------------------------------------------
825
826 public:
827 //============== Methoden
828 //---------------------------------------------------------------------
839 //---------------------------------------------------------------------
850 //---------------------------------------------------------------------
862 unsigned int Counter() const;
863 //---------------------------------------------------------------------
880 //---------------------------------------------------------------------
897 //---------------------------------------------------------------------
898
899 private:
900 //============== Operatoren
901 //---------------------------------------------------------------------
911 Manager::SchemaMapItem & operator= ( const SchemaMapItem & );
912 //---------------------------------------------------------------------
913 };
914 //-----------------------------------------------------------------------
915 // <<<<<<<<<<<<<<<<<<<<<<< SchemaMapItem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
916 //-----------------------------------------------------------------------
917
918 private:
919 //============== Static-Attribute
920 //-----------------------------------------------------------------------
931 //-----------------------------------------------------------------------
942 //-----------------------------------------------------------------------
953 //-----------------------------------------------------------------------
964
965 //============== Attribute
966 //-----------------------------------------------------------------------
976 unsigned int m_uiCommunicatorID;
977 //-----------------------------------------------------------------------
987 std::string m_strSchemaPath;
988 //-----------------------------------------------------------------------
998 std::vector<std::string> m_KnownSchemes;
999 //-----------------------------------------------------------------------
1011 std::map< std::string, SchemaMapItem *, std::less< std::string > > m_SchemaMap;
1012 //-----------------------------------------------------------------------
1022 std::queue< OrderMsg * > m_MsgQueue;
1023 //-----------------------------------------------------------------------
1033 std::map< SOCKET, ClientInfo , std::less< SOCKET > > m_ConnectedClientsMap;
1034 //-----------------------------------------------------------------------
1046 std::map< Communicator *, Receiver * , std::less< Communicator * > > m_ReceiverMap;
1047 //-----------------------------------------------------------------------
1058 //-----------------------------------------------------------------------
1069 //-----------------------------------------------------------------------
1080 //-----------------------------------------------------------------------
1091 //-----------------------------------------------------------------------
1104 //-----------------------------------------------------------------------
1117 #if defined (__PTHREADS)
1119 #else
1121 #endif
1122 //-----------------------------------------------------------------------
1123
1124 protected:
1125 //============= Konstruktoren
1126 //-----------------------------------------------------------------------
1137 #if defined(__GNUC__)
1138 __attribute__((noreturn))
1139 #endif
1140 ;
1141 //-----------------------------------------------------------------------
1160 Manager( const std::string & rsSchemaPath,
1161 const std::vector< std::string > & rAllowedSchemes );
1162 //-----------------------------------------------------------------------
1172 virtual ~Manager();
1173 //-----------------------------------------------------------------------
1174
1175 private:
1176 //============== Konstruktoren
1177 //-----------------------------------------------------------------------
1187 Manager( const Manager & );
1188 //-----------------------------------------------------------------------
1189
1190 public:
1191 //============== statische Methoden
1192 //-----------------------------------------------------------------------
1218 static Manager * create( const std::string & rsSchemaPath,
1219 const std::vector< std::string > & rAllowedSchemes );
1220 //-----------------------------------------------------------------------
1235 static int destroy();
1236 //-----------------------------------------------------------------------
1255 //-----------------------------------------------------------------------
1275 static void setActionVisualiser( ManagerActionVisualiser * pActionVisualiser );
1276 //-----------------------------------------------------------------------
1288 static void setShowLevel( ShowLevel ulLevel );
1289 //-----------------------------------------------------------------------
1302 //-----------------------------------------------------------------------
1316 static void showActionString( const std::string & sActionString );
1317 //-----------------------------------------------------------------------
1339 static void showAction( const OrderMsg * pOrderMsg,
1340 const std::string & rsActiontype,
1341 const std::string & rsActionString,
1342 char cSE);
1343 //-----------------------------------------------------------------------
1361 static void showOrderAction( OrderMsg * pOrderMsg, char cSE );
1362 //-----------------------------------------------------------------------
1384 static void showTransactionAction( OrderMsg * pOrderMsg,
1385 const std::string & rsActionString,
1386 char cSE);
1387 //-----------------------------------------------------------------------
1407 static void showWriterAction( OrderMsg * pOrderMsg,
1408 const std::string & rsActionString,
1409 char cSE);
1410 //-----------------------------------------------------------------------
1430 static void showReaderAction( OrderMsg * pOrderMsg,
1431 const std::string & rsActionString,
1432 char cSE);
1433 //-----------------------------------------------------------------------
1434
1435 //============== Methoden
1436 //-----------------------------------------------------------------------
1453 //-----------------------------------------------------------------------
1465 std::string getSchemaPath() const;
1466 //-----------------------------------------------------------------------
1483 void getKnownBases( std::vector< std::string > & rKnownBasesVector ) const;
1484 //-----------------------------------------------------------------------
1499 bool isBaseOpen( Communicator * pCommunicator );
1500 //-----------------------------------------------------------------------
1512 int takeOrder( OrderMsg * pOrderMsg );
1513 //-----------------------------------------------------------------------
1534 void getAllClients( std::vector< ClientInfo > & rClientInfoVector,
1535 std::string * psSchemaName = 0 ) const;
1536 //-----------------------------------------------------------------------
1537
1538 #ifdef _GLO_TEST
1539 public:
1540 #else
1541 protected:
1542 #endif
1543 //============== Methoden
1544 //-----------------------------------------------------------------------
1564 Manager::SchemaMapItem * getSchemaMapItem( const std::string & rsSchemaName ) const;
1565 //-----------------------------------------------------------------------
1585 SchemaInterface * getSchemaInterface( const std::string & rsSchemaName ) const;
1586 //-----------------------------------------------------------------------
1609 int createSchemaInterface( SchemaInterface *& prNewSchemaInterface,
1610 const std::string & rsSchemaName ) const;
1611 //-----------------------------------------------------------------------
1624 void insertInKnownBases( const std::vector< std::string > & rNewSchemes );
1625 //-----------------------------------------------------------------------
1626
1627 //============== Auftrags-Methoden
1628 //-----------------------------------------------------------------------
1645 void getAllKnownBases( OrderMsg * pOrderMsg ) const;
1646 //-----------------------------------------------------------------------
1667 void getClassInfo( OrderMsg * pOrderMsg ) const;
1668 //-----------------------------------------------------------------------
1692 void getBaseOrSubClassInfos( OrderMsg * pOrderMsg ) const;
1693 //-----------------------------------------------------------------------
1712 void getAllDataTypes( OrderMsg * pOrderMsg ) const;
1713 //-----------------------------------------------------------------------
1732 void getDataTypeLimits( OrderMsg * pOrderMsg ) const;
1733 //-----------------------------------------------------------------------
1750 void getAllClients( OrderMsg * pOrderMsg ) const;
1751 //-----------------------------------------------------------------------
1774 void openBase( OrderMsg * pOrderMsg );
1775 //-----------------------------------------------------------------------
1795 void closeBase( OrderMsg * pOrderMsg );
1796 //-----------------------------------------------------------------------
1819 void reindexBase( OrderMsg * pOrderMsg );
1820 //-----------------------------------------------------------------------
1845 void compressBase( OrderMsg * pOrderMsg );
1846 //-----------------------------------------------------------------------
1870 void repairBase( OrderMsg * pOrderMsg );
1871 //-----------------------------------------------------------------------
1896 void removeCommunicator( OrderMsg * pOrderMsg,
1897 WatchNotifyManager * pWatchNotifyManager = 0 );
1898 //-----------------------------------------------------------------------
1916 //-----------------------------------------------------------------------
1934 //-----------------------------------------------------------------------
1980 void sendToReaderThread( OrderMsg * pOrderMsg, bool bOnlyRefreshError = false );
1981 //-----------------------------------------------------------------------
2007 void sendToWriter( OrderMsg * pOrderMsg );
2008 //-----------------------------------------------------------------------
2028 int sendBEGINtoTransactionManager( const TransactionOwner & rCommunicatorWithTreadID );
2029 //-----------------------------------------------------------------------
2051 int sendABORTtoTransactionManager( const TransactionOwner & rCommunicatorWithTreadID,
2052 std::string sSchemaName );
2053 //-----------------------------------------------------------------------
2080 int sendCOMMITtoTransactionManager( const TransactionOwner & rCommunicatorWithTreadID,
2081 std::string sSchemaName,
2082 std::map< ObjID, Record *, std::less<ObjID> > * pInputDataRecordMap );
2083 //-----------------------------------------------------------------------
2103 //-----------------------------------------------------------------------
2104 #ifdef _GLO_TEST
2105 //---------------------------------------------------------------------
2117 LockManager * getLockManager();
2118 //---------------------------------------------------------------------
2119 #endif
2120 //-----------------------------------------------------------------------
2139 void sendToLockManager( OrderMsg * pOrderMsg );
2140 //-----------------------------------------------------------------------
2177 SchemaInterface * pSchema,
2178 std::list<ObjID> * pObjectIDsToBeLocked,
2179 LockSpecification * pLockSpec,
2180 const TransactionOwner & rCommunicatorWithTreadID );
2181 //-----------------------------------------------------------------------
2205 //-----------------------------------------------------------------------
2223 //-----------------------------------------------------------------------
2244 const ObjID & rObjID,
2245 Communicator * pCommunicator,
2246 const std::string & rsSchemaName );
2247 //-----------------------------------------------------------------------
2268 const std::list<ObjID> & rObjIDList,
2269 Communicator * pCommunicator,
2270 const std::string & rsSchemaName );
2271 //-----------------------------------------------------------------------
2272
2273 //============== Unterstützer-Methoden
2274 //-----------------------------------------------------------------------
2275 #if defined(_MSC_VER)
2276 //-----------------------------------------------------------------------
2302 int lockBaseExclusive( std::ofstream *& prLockFile,
2303 const SchemaInterface & rSchemaInterface );
2304 //-----------------------------------------------------------------------
2305 #elif defined(__MINGW32__) || defined(__MINGW64__)
2306 //-----------------------------------------------------------------------
2332 int lockBaseExclusive( void *& prLockFileHandle,
2333 const SchemaInterface & rSchemaInterface );
2334 //-----------------------------------------------------------------------
2335 #elif defined(__GNUC__)
2336 //-----------------------------------------------------------------------
2362 int lockBaseExclusive( int & riLockFileHandle,
2363 const SchemaInterface & rSchemaInterface );
2364 //-----------------------------------------------------------------------
2365 #endif
2366 //-----------------------------------------------------------------------
2387 //-----------------------------------------------------------------------
2399 std::size_t getNumberReceiver() const;
2400 //-----------------------------------------------------------------------
2416 std::size_t getNumberReceiver( std::string sSchemaName ) const;
2417 //-----------------------------------------------------------------------
2428 //-----------------------------------------------------------------------
2446 void switchOffRecieverReader( std::string sSchemaName );
2447 //-----------------------------------------------------------------------
2458 //-----------------------------------------------------------------------
2474 void switchOnRecieverReader( std::string sSchemaName );
2475 //-----------------------------------------------------------------------
2505 void getAllTransactionIndexPools( std::vector< TransactionIndexPool * > & rTransactionIndexPoolVector,
2506 std::string * psSchemaName = 0,
2507 Communicator * pWithoutThisCommunicator = 0 ) const;
2508 //-----------------------------------------------------------------------
2530 const TransactionOwner & rCommunicatorWithTreadID,
2531 TransactionManager::EnStoreDelete eStoreOrDelete,
2532 Record * pRecord );
2533 //-----------------------------------------------------------------------
2577 int checkAllRecordIndices( int iCheckStatus,
2578 const SchemaInterface & rSchema,
2579 const std::map< ObjID, Record *, std::less<ObjID> > & rRecordMap,
2580 IndexPool & rGloIndexPool ) const;
2581 //-----------------------------------------------------------------------
2605 void releaseStrIndexesFromTransactionStepList( std::list< TransactionManager::TransactionBase * > & rTransactionStepList,
2606 std::string & rsSchemaName );
2607 //-----------------------------------------------------------------------
2644 void unlockTransactionStepList( std::list< TransactionManager::TransactionBase * > & rTransactionStepList,
2645 const TransactionOwner & rCommunicatorWithTreadID,
2646 const std::string & rsSchemaName,
2647 TransactionIndexPool * pTransactionIndexPool,
2648 bool bDelete );
2649 //-----------------------------------------------------------------------
2650 // doxygen -> warning: unable to resolve reference to 'GLO_REF_DEPENDENT' for \ref command
2651 // Is a reference to the GlobalObjects documentation.
2683 int getRecord( Record *& prRetVal,
2684 const glo::ObjID & rObjID,
2685 const TableReaderInterface & rTableReaderInterface,
2686 TransactionOwner * pCommunicatorWithTreadID = nullptr ) const;
2687 //-----------------------------------------------------------------------
2688 // doxygen -> warning: unable to resolve reference to 'GLO_REF_DEPENDENT' for \ref command
2689 // Is a reference to the GlobalObjects documentation.
2725 void getDependRecords( std::map< ObjID, Record *, std::less<ObjID> > & rDependRecordMap,
2726 Record & rSourceRecord,
2727 const TableReaderInterface & rTableReaderInterface,
2728 EnDeepMode eDeepMode,
2729 TransactionOwner * pCommunicatorWithTreadID = nullptr ) const;
2730 //-----------------------------------------------------------------------
2731 // doxygen -> warning: unable to resolve reference to 'GLO_REF_DEPENDENT' for \ref command
2732 // Is a reference to the GlobalObjects documentation.
2771 void getDependRecordsRecursive( std::map< ObjID, Record *, std::less<ObjID> > & rDependRecordMap,
2772 Record & rSourceRecord,
2773 const TableReaderInterface & rTableReaderInterface,
2774 EnDeepMode eDeepMode,
2775 TransactionOwner * pCommunicatorWithTreadID = nullptr ) const;
2776 //-----------------------------------------------------------------------
2787 //-----------------------------------------------------------------------
2798 //-----------------------------------------------------------------------
2799
2800 //============== Die Thread-Methode
2801 //-----------------------------------------------------------------------
2816 virtual void work() override;
2817 //-----------------------------------------------------------------------
2818
2819 private:
2820 //============== Operatoren
2821 //-----------------------------------------------------------------------
2831 Manager & operator= ( const Manager & );
2832 //-----------------------------------------------------------------------
2833 };
2834 //---------------------------------------------------------------------------
2835 #ifdef _MSC_VER
2836 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
2837 #pragma warning( default : 4251 )
2838 #endif
2839 //---------------------------------------------------------------------------
2840} // namespace glo
2841#endif
Header für CriticalSection
Header für EuEndlessPThread
Header für EuPCriticalSection
Header für RepeatingThread
Header für LockSpecification
Header für OrderMsg
Header für TransactionManager TransactionManager::TransactionBase TransactionManager::Transactio...
Header für TransactionOwner
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Header für WatchSpecification
Header für TDVList
Bindet die Socket-Bibliothek/en ein und definiert Socket-Typen.
Ist ein Mutex, welcher über sein Lock-Modus abgefragt werden kann. Siehe isLocked().
Definition EuPCriticalSection.h:104
Ist ein Mutex, welcher über sein Lock-Modus abgefragt werden kann. Siehe isLocked().
Definition EuCriticalSection.h:109
Basisklasse für einen Thread der seine Arbeit endlos bis zum Abbruch ausführt.
Definition EuRepeatingThread.h:94
Ein CommunicaterThread nimmt Aufträge für sein TableReaderInterface an.
Definition GloCommunicaterThread.h:89
OberKlasse von LocalThread, ClientThread und ServerThread, weil diese als Sender und Empfänger (Kommu...
Definition GloCommunicator.h:93
IndexPool ist die Basisklasse für den RealIndexPool und den TransactionIndexPool für die einzelnen Tr...
Definition GloIndexPool.h:196
Objekte dieser Klasse überwachen den Sperrzustand von Objekten.
Definition GloLockManager.h:239
Um Objekte sperren zu können, werden der 'Lock-Modus' und die 'Sperrtiefe' als Parameter benötigt....
Definition GloLockSpecification.h:65
Ist die Gegenstelle bzw. der Kommunikator, welcher mit dem Manager kommuniziert. Bei dem Mehrbenutzbe...
Definition GloManager.h:208
CommunicaterThread * m_pCommunicatorThread
Definition GloManager.h:264
std::string getSchemaName() const
std::string m_sSchemaName
Definition GloManager.h:242
unsigned int m_uiRefCounter
Definition GloManager.h:229
unsigned int decrementRefCounter()
Receiver(const std::string &sSchemaName, CommunicaterThread *pCommunicatorThread, Communicator *pCommunicator)
Receiver(const Receiver &)
Communicator * m_pCommunicator
Definition GloManager.h:253
unsigned int incrementRefCounter()
CommunicaterThread * getCommunicatorThread() const
Communicator * getCommunicator() const
Objekte dieser Klasse repräsentieren eine geöffnete Datenbank. Es gibt für jede geöffnete Datenbank e...
Definition GloManager.h:552
TableWriterInterface * m_pTableWriterInterface
Definition GloManager.h:591
unsigned int Counter() const
SchemaMapItem(const SchemaMapItem &)
SchemaInterface * m_pSchema
Definition GloManager.h:580
std::ofstream * m_pLockFile
Definition GloManager.h:607
unsigned int m_uiCounter
Definition GloManager.h:569
TableWriterInterface * getTableWriterInterface() const
SchemaInterface * getSchema() const
SchemaMapItem(SchemaInterface *pSchema, RealIndexPool *pRealIndexPool, std::ofstream *pLockFile)
Zeigt die Aktionen des Manager über std::cout an.
Definition GloManagerActionVisualiser.h:70
Das Objekt dieser Klasse ist die zentrale Anlaufstelle für Aktionen, welche mit GlobalObjects-Daten z...
Definition GloManager.h:176
int transactionManagerSetTransactionStep(const SchemaInterface &rSchema, const TransactionOwner &rCommunicatorWithTreadID, TransactionManager::EnStoreDelete eStoreOrDelete, Record *pRecord)
int createSchemaInterface(SchemaInterface *&prNewSchemaInterface, const std::string &rsSchemaName) const
static ShowLevel getShowLevel()
std::map< SOCKET, ClientInfo, std::less< SOCKET > > m_ConnectedClientsMap
Definition GloManager.h:1033
RealIndexPool * getRealIndexPool()
static Manager * create(const std::string &rsSchemaPath, const std::vector< std::string > &rAllowedSchemes)
void deleteCommunicatorWatches(OrderMsg *pOrderMsg)
void openBase(OrderMsg *pOrderMsg)
void getDependRecordsRecursive(std::map< ObjID, Record *, std::less< ObjID > > &rDependRecordMap, Record &rSourceRecord, const TableReaderInterface &rTableReaderInterface, EnDeepMode eDeepMode, TransactionOwner *pCommunicatorWithTreadID=nullptr) const
friend class TcpServerReceiver
Definition GloManager.h:183
void sendToWatchNotifyManager(OrderMsg *pOrderMsg)
void getAllTransactionIndexPools(std::vector< TransactionIndexPool * > &rTransactionIndexPoolVector, std::string *psSchemaName=0, Communicator *pWithoutThisCommunicator=0) const
void compressBase(OrderMsg *pOrderMsg)
std::size_t getNumberReceiver() const
static void showWriterAction(OrderMsg *pOrderMsg, const std::string &rsActionString, char cSE)
friend class LockManager
Definition GloManager.h:181
virtual ~Manager()
std::vector< std::string > m_KnownSchemes
Definition GloManager.h:998
void getAllDataTypes(OrderMsg *pOrderMsg) const
WatchNotifyManager * m_pWatchNotifyManager
Definition GloManager.h:1079
Manager::SchemaMapItem * getSchemaMapItem(const std::string &rsSchemaName) const
static ManagerActionVisualiser * m_pActionVisualiser
Definition GloManager.h:963
int getRecord(Record *&prRetVal, const glo::ObjID &rObjID, const TableReaderInterface &rTableReaderInterface, TransactionOwner *pCommunicatorWithTreadID=nullptr) const
void deleteAllObjectsInReceiverMap()
std::map< Communicator *, Receiver *, std::less< Communicator * > > m_ReceiverMap
Definition GloManager.h:1046
std::string getSchemaPath() const
eut::CriticalSection m_LocalCriticalSection
Definition GloManager.h:1120
void processObjectNotify(TdWatchNotifyMode nWatchNotifyMode, const std::list< ObjID > &rObjIDList, Communicator *pCommunicator, const std::string &rsSchemaName)
int checkAllRecordIndices(int iCheckStatus, const SchemaInterface &rSchema, const std::map< ObjID, Record *, std::less< ObjID > > &rRecordMap, IndexPool &rGloIndexPool) const
static int ms_iReferenceCounter
Definition GloManager.h:930
void insertInKnownBases(const std::vector< std::string > &rNewSchemes)
std::string m_strSchemaPath
Definition GloManager.h:987
void deleteAllObjectsInSchemaMap()
int lockBaseExclusive(std::ofstream *&prLockFile, const SchemaInterface &rSchemaInterface)
void processObjectNotify(TdWatchNotifyMode nWatchNotifyMode, const ObjID &rObjID, Communicator *pCommunicator, const std::string &rsSchemaName)
void getDataTypeLimits(OrderMsg *pOrderMsg) const
LockManager * m_pLockManager
Definition GloManager.h:1057
friend class OrderMsg
Definition GloManager.h:182
static ShowLevel m_ulShowLevel
Definition GloManager.h:952
static void showTransactionAction(OrderMsg *pOrderMsg, const std::string &rsActionString, char cSE)
friend class TableWriterInterface
Definition GloManager.h:184
void releaseStrIndexesFromTransactionStepList(std::list< TransactionManager::TransactionBase * > &rTransactionStepList, std::string &rsSchemaName)
void getBaseOrSubClassInfos(OrderMsg *pOrderMsg) const
void repairBase(OrderMsg *pOrderMsg)
void switchOffAllRecieverReader()
void getDependRecords(std::map< ObjID, Record *, std::less< ObjID > > &rDependRecordMap, Record &rSourceRecord, const TableReaderInterface &rTableReaderInterface, EnDeepMode eDeepMode, TransactionOwner *pCommunicatorWithTreadID=nullptr) const
void sendToTransactionManager(OrderMsg *pOrderMsg)
static void setActionVisualiser(ManagerActionVisualiser *pActionVisualiser)
void getAllKnownBases(OrderMsg *pOrderMsg) const
Manager(const Manager &)
int sendToLockManager(OrderMsg::EnOrderType eOrderType, SchemaInterface *pSchema, std::list< ObjID > *pObjectIDsToBeLocked, LockSpecification *pLockSpec, const TransactionOwner &rCommunicatorWithTreadID)
void getClassInfo(OrderMsg *pOrderMsg) const
int sendCOMMITtoTransactionManager(const TransactionOwner &rCommunicatorWithTreadID, std::string sSchemaName, std::map< ObjID, Record *, std::less< ObjID > > *pInputDataRecordMap)
void removeCommunicator(OrderMsg *pOrderMsg, WatchNotifyManager *pWatchNotifyManager=0)
int sendBEGINtoTransactionManager(const TransactionOwner &rCommunicatorWithTreadID)
void sendToLockManager(OrderMsg *pOrderMsg)
static void showOrderAction(OrderMsg *pOrderMsg, char cSE)
virtual void work() override
void closeBase(OrderMsg *pOrderMsg)
void getKnownBases(std::vector< std::string > &rKnownBasesVector) const
std::map< std::string, SchemaMapItem *, std::less< std::string > > m_SchemaMap
Definition GloManager.h:1011
static Manager * getAvailableInstance()
int sendABORTtoTransactionManager(const TransactionOwner &rCommunicatorWithTreadID, std::string sSchemaName)
void getAllClients(std::vector< ClientInfo > &rClientInfoVector, std::string *psSchemaName=0) const
static void showActionString(const std::string &sActionString)
void getAllClients(OrderMsg *pOrderMsg) const
void unlockTransactionStepList(std::list< TransactionManager::TransactionBase * > &rTransactionStepList, const TransactionOwner &rCommunicatorWithTreadID, const std::string &rsSchemaName, TransactionIndexPool *pTransactionIndexPool, bool bDelete)
static int destroy()
void switchOnRecieverReader(std::string sSchemaName)
SchemaInterface * getSchemaInterface(const std::string &rsSchemaName) const
std::size_t getNumberReceiver(std::string sSchemaName) const
bool m_bWorkingExclusiv
Definition GloManager.h:1103
void sendToReaderThread(OrderMsg *pOrderMsg, bool bOnlyRefreshError=false)
static void showReaderAction(OrderMsg *pOrderMsg, const std::string &rsActionString, char cSE)
friend class WatchNotifyManager
Definition GloManager.h:180
std::queue< OrderMsg * > m_MsgQueue
Definition GloManager.h:1022
void reindexBase(OrderMsg *pOrderMsg)
void sendToWriter(OrderMsg *pOrderMsg)
unsigned int m_uiCommunicatorID
Definition GloManager.h:976
static void setShowLevel(ShowLevel ulLevel)
Manager(const std::string &rsSchemaPath, const std::vector< std::string > &rAllowedSchemes)
RealIndexPool * m_pRealIndexPool
Definition GloManager.h:1090
static void showAction(const OrderMsg *pOrderMsg, const std::string &rsActiontype, const std::string &rsActionString, char cSE)
void processNewConnectedClient(OrderMsg *pOrderMsg)
void switchOnAllRecieverReader()
int takeOrder(OrderMsg *pOrderMsg)
void processDisconnectedClient(OrderMsg *pOrderMsg)
static Manager * m_pInstance
Definition GloManager.h:941
bool isBaseOpen(Communicator *pCommunicator)
void switchOffRecieverReader(std::string sSchemaName)
Manager::Receiver * getReceiver(Communicator *pCommunicator)
TransactionManager * m_pTransactionManager
Definition GloManager.h:1068
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:84
EnOrderType
Definition GloOrderMsg.h:105
Der reale Index im Gegensatz zum TransactionIndexPool, welcher für jede Transaktion erstellt wird.
Definition GloRealIndexPool.h:69
Objekte dieser Klasse transportieren die Daten von den Tabellen ins persistente Objekt und von diesen...
Definition GloRecord.h:108
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:91
Der Server, welcher mit Client's kommuniziert.
Definition GloServer.h:71
Ein Objekt dieser Klasse greift auf Tabellen zu und liest Datensätze (Record) und Binärdateien (eut::...
Definition GloTableReaderInterface.h:88
Ein Objekt dieser Klasse greift auf Tabellen zu und schreibt Datensätze (Record) und Binärdateien (eu...
Definition GloTableWriterInterface.h:77
Dieser Index wird in jeder Transaktion generiert und die Änderungen wie speichern,...
Definition GloTransactionIndexPool.h:66
Klasse um Transaktionen zu gewährleisten.
Definition GloTransactionManager.h:172
EnStoreDelete
Definition GloTransactionManager.h:186
Um Transaktionen nicht nur einem glo::Communicator zur Verfügung zu stellen, sondern auch einzelnen T...
Definition GloTransactionOwner.h:81
Klassen um persistente Objekte überwachen zu können und bei Änderungen die jeweiligen Clients zu bean...
Definition GloWatchNotifyManager.h:352
Definition GloAbstractBaseLot.h:49
EnDeepMode
Definition GloTypes.h:254
unsigned long ShowLevel
Definition GloTypes.h:839
unsigned long TdWatchNotifyMode
Definition GloTypes.h:558
Eine Struktur um ClientDaten zwischen Datenbank und Client zu transportieren.
Definition GloClientInfo.h:71
ObjIdWithDepends(const ObjID &rObjID, std::map< ObjID, Record *, std::less< ObjID > > *pDependRecordMap)
std::map< ObjID, Record *, std::less< ObjID > > * m_pDependRecordMap
Definition GloManager.h:481
ObjID m_ObjID
Definition GloManager.h:465