GlobalObjects
Loading...
Searching...
No Matches
GloCommunicaterThread.h
Go to the documentation of this file.
1#ifndef INC_GLOCOMMUNICATORTHREAD_H
2#define INC_GLOCOMMUNICATORTHREAD_H
3//-----------------------------------------------------------------------------
42//-----------------------------------------------------------------------------
43#include <queue>
44#include "GloTypes.h"
46#include "GloOrderMsg.h"
47#if defined (__PTHREADS)
48 #include <EuEndlessPThread.h>
49 #include <semaphore.h>
50#else
51 #include "EuRepeatingThread.h"
52#endif
53//-----------------------------------------------------------------------------
54namespace glo
55{
56 //---------------------------------------------------------------------------
57 /* Forwards */
58 class IndexQueryBaseStruct;
59 //---------------------------------------------------------------------------
83 #if defined (__PTHREADS)
84 class CommunicaterThread : public EuEndlessPThread
85 #else
87 #endif
88
89 {
90 private:
91 //============== Attribute
92 //-----------------------------------------------------------------------
103 //-----------------------------------------------------------------------
114 std::queue<OrderMsg *> m_MsgQueue;
115 //-----------------------------------------------------------------------
116
117 //============== Konstruktoren
118 //-----------------------------------------------------------------------
129 //-----------------------------------------------------------------------
130
131 public:
132 //============== Konstruktoren
133 //-----------------------------------------------------------------------
152 RealIndexPool * pRealIndexPool );
153 //-----------------------------------------------------------------------
164 //-----------------------------------------------------------------------
165
166 private:
167 //============== Konstruktoren
168 //-----------------------------------------------------------------------
179 //-----------------------------------------------------------------------
180
181 public:
182 //============== Methoden
183 //-----------------------------------------------------------------------
202 //-----------------------------------------------------------------------
216 void takeOrder( OrderMsg * pOrderMsg );
217 //-----------------------------------------------------------------------
228 //-----------------------------------------------------------------------
229
230 protected:
231 //============== Methoden
232 //-----------------------------------------------------------------------
253 void getRecord( OrderMsg * pOrderMsg );
254 //-----------------------------------------------------------------------
276 void getObjectData( OrderMsg * pOrderMsg );
277 //-----------------------------------------------------------------------
296 void checkStored( OrderMsg * pOrderMsg );
297 //-----------------------------------------------------------------------
316 void openAllSet( OrderMsg * pOrderMsg );
317 //-----------------------------------------------------------------------
336 void closeAllSet( OrderMsg * pOrderMsg );
337 //-----------------------------------------------------------------------
356 void getObjIdFromAllSet( OrderMsg * pOrderMsg );
357 //-----------------------------------------------------------------------
379 //-----------------------------------------------------------------------
400 //-----------------------------------------------------------------------
422 //-----------------------------------------------------------------------
455 IndexQueryBaseStruct * pGloIndexQueryBaseStruct );
456 //-----------------------------------------------------------------------
476 //-----------------------------------------------------------------------
496 //-----------------------------------------------------------------------
516 //-----------------------------------------------------------------------
535 void removeIndexFilter( OrderMsg * pOrderMsg );
536 //-----------------------------------------------------------------------
566 void transformIndexStrings( IndexQueryBaseStruct & rGloIndexQueryBaseStruct );
567 //-----------------------------------------------------------------------
599 IndexQueryBaseStruct * pGloIndexQueryBaseStruct );
600 //-----------------------------------------------------------------------
619 void getSizeFromAllSet( OrderMsg * pOrderMsg );
620 //-----------------------------------------------------------------------
641 //-----------------------------------------------------------------------
661 void setPositionInAllSet( OrderMsg * pOrderMsg );
662 //-----------------------------------------------------------------------
681 void objIDInAllSet( OrderMsg * pOrderMsg );
682 //-----------------------------------------------------------------------
683
684 //============== Die Thread-Methode
685 //-----------------------------------------------------------------------
701 virtual void work() override;
702 //-----------------------------------------------------------------------
703 #if defined (__PTHREADS)
719 virtual void cleanUp();
720 //-----------------------------------------------------------------------
721 #else
722
723 public:
724 //============== Methoden
725 //-------------------------------------------------------------------------
746 virtual void cancel() override;
747 //-----------------------------------------------------------------------
748 #endif
749
750 protected:
751 //============== Operatoren
752 //-----------------------------------------------------------------------
765 bool operator== ( const CommunicaterThread & rT ) const;
766 bool operator!= ( const CommunicaterThread & rT ) const;
768 //-----------------------------------------------------------------------
769
770 private:
771 //============== Operatoren
772 //-----------------------------------------------------------------------
783 //-----------------------------------------------------------------------
784 };
785 //---------------------------------------------------------------------------
786} // namespace glo
787#endif
Header for EuEndlessPThread
Header for RepeatingThread
Header for OrderMsg
Header for TableReaderInterface
For each library, here 'GlobalObjects' there is a type file.
Base class for a thread that executes its work endlessly until aborted.
Definition EuEndlessPThread.h:84
Base class for a thread that executes its work endlessly until aborted.
Definition EuRepeatingThread.h:93
A CommunicaterThread accepts requests for its TableReaderInterface.
Definition GloCommunicaterThread.h:89
void getObjIdFromAllSet(OrderMsg *pOrderMsg)
void takeOrder(OrderMsg *pOrderMsg)
virtual void work() override
std::queue< OrderMsg * > m_MsgQueue
Definition GloCommunicaterThread.h:114
void closeAllSet(OrderMsg *pOrderMsg)
void getObjectData(OrderMsg *pOrderMsg)
bool operator!=(const CommunicaterThread &rT) const
void getRecord(OrderMsg *pOrderMsg)
void getIndexedObjIdListBySearchValueFromAllSet(OrderMsg *pOrderMsg)
void objIDInAllSet(OrderMsg *pOrderMsg)
void getSizeFromAllSet(OrderMsg *pOrderMsg)
void openAllSet(OrderMsg *pOrderMsg)
void transformIndexStrings(IndexQueryBaseStruct &rGloIndexQueryBaseStruct)
TableReaderInterface * m_pTableReader
Definition GloCommunicaterThread.h:102
TableReaderInterface * getReader() const
void removeIndexFilter(OrderMsg *pOrderMsg)
CommunicaterThread(SchemaInterface *pSchema, RealIndexPool *pRealIndexPool)
void setIndexFilterByRangeInSet(OrderMsg *pOrderMsg)
CommunicaterThread & operator=(const CommunicaterThread &)
void setIndexFilterBySearchValueInSet(OrderMsg *pOrderMsg)
void checkStored(OrderMsg *pOrderMsg)
virtual void cancel() override
void getIndexedObjIdListByRangeFromAllSet(OrderMsg *pOrderMsg)
void setAnyIndexFilterInAllSet(OrderMsg *pOrderMsg, IndexQueryBaseStruct *pGloIndexQueryBaseStruct)
void getIndexedObjIdListByComparingFromAllSet(OrderMsg *pOrderMsg)
void setIndexFilterByComparingInSet(OrderMsg *pOrderMsg)
CommunicaterThread(const CommunicaterThread &)
bool operator==(const CommunicaterThread &rT) const
void setPositionInAllSet(OrderMsg *pOrderMsg)
void setCurrentObjectInAllSet(OrderMsg *pOrderMsg)
void getAnyIndexedObjIdListFromAllSet(OrderMsg *pOrderMsg, IndexQueryBaseStruct *pGloIndexQueryBaseStruct)
Definition GloIndexQueryBaseStruct.h:72
This class is used to handle the communication between the application that uses GlobalObjects and Gl...
Definition GloOrderMsg.h:84
The real index as opposed to the TransactionIndexPool, which is created for each transaction
Definition GloRealIndexPool.h:69
This class is the interface to a GlobalObjects schema. It contains all class information to store obj...
Definition GloSchemaInterface.h:91
An object of this class accesses tables and reads data records (Record) and binary files (eut::Blob).
Definition GloTableReaderInterface.h:87
Definition GloAbstractBaseLot.h:49