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//-----------------------------------------------------------------------------
35//-----------------------------------------------------------------------------
36#include <queue>
37#include "GloTypes.h"
39#include "GloOrderMsg.h"
40#if defined (__PTHREADS)
41 #include <EuEndlessPThread.h>
42 #include <semaphore.h>
43#else
44 #include "EuRepeatingThread.h"
45#endif
46//-----------------------------------------------------------------------------
47namespace glo
48{
49 //---------------------------------------------------------------------------
50 /* Forwards */
51 class IndexQueryBaseStruct;
52 //---------------------------------------------------------------------------
76 #if defined (__PTHREADS)
77 class CommunicaterThread : public EuEndlessPThread
78 #else
80 #endif
81
82 {
83 private:
84 //============== Attribute
85 //-----------------------------------------------------------------------
96 //-----------------------------------------------------------------------
107 std::queue<OrderMsg *> m_MsgQueue;
108 //-----------------------------------------------------------------------
109
110 //============== Konstruktoren
111 //-----------------------------------------------------------------------
122 //-----------------------------------------------------------------------
123
124 public:
125 //============== Konstruktoren
126 //-----------------------------------------------------------------------
145 RealIndexPool * pRealIndexPool );
146 //-----------------------------------------------------------------------
157 //-----------------------------------------------------------------------
158
159 private:
160 //============== Konstruktoren
161 //-----------------------------------------------------------------------
172 //-----------------------------------------------------------------------
173
174 public:
175 //============== Methoden
176 //-----------------------------------------------------------------------
195 //-----------------------------------------------------------------------
209 void takeOrder( OrderMsg * pOrderMsg );
210 //-----------------------------------------------------------------------
221 //-----------------------------------------------------------------------
222
223 protected:
224 //============== Methoden
225 //-----------------------------------------------------------------------
246 void getRecord( OrderMsg * pOrderMsg );
247 //-----------------------------------------------------------------------
269 void getObjectData( OrderMsg * pOrderMsg );
270 //-----------------------------------------------------------------------
289 void checkStored( OrderMsg * pOrderMsg );
290 //-----------------------------------------------------------------------
309 void openAllSet( OrderMsg * pOrderMsg );
310 //-----------------------------------------------------------------------
329 void closeAllSet( OrderMsg * pOrderMsg );
330 //-----------------------------------------------------------------------
349 void getObjIdFromAllSet( OrderMsg * pOrderMsg );
350 //-----------------------------------------------------------------------
372 //-----------------------------------------------------------------------
393 //-----------------------------------------------------------------------
415 //-----------------------------------------------------------------------
448 IndexQueryBaseStruct * pGloIndexQueryBaseStruct );
449 //-----------------------------------------------------------------------
469 //-----------------------------------------------------------------------
489 //-----------------------------------------------------------------------
509 //-----------------------------------------------------------------------
528 void removeIndexFilter( OrderMsg * pOrderMsg );
529 //-----------------------------------------------------------------------
559 void transformIndexStrings( IndexQueryBaseStruct & rGloIndexQueryBaseStruct );
560 //-----------------------------------------------------------------------
592 IndexQueryBaseStruct * pGloIndexQueryBaseStruct );
593 //-----------------------------------------------------------------------
612 void getSizeFromAllSet( OrderMsg * pOrderMsg );
613 //-----------------------------------------------------------------------
634 //-----------------------------------------------------------------------
654 void setPositionInAllSet( OrderMsg * pOrderMsg );
655 //-----------------------------------------------------------------------
674 void objIDInAllSet( OrderMsg * pOrderMsg );
675 //-----------------------------------------------------------------------
676
677 //============== Die Thread-Methode
678 //-----------------------------------------------------------------------
694 virtual void work() override;
695 //-----------------------------------------------------------------------
696 #if defined (__PTHREADS)
712 virtual void cleanUp();
713 //-----------------------------------------------------------------------
714 #else
715
716 public:
717 //============== Methoden
718 //-------------------------------------------------------------------------
739 virtual void cancel() override;
740 //-----------------------------------------------------------------------
741 #endif
742
743 protected:
744 //============== Operatoren
745 //-----------------------------------------------------------------------
758 bool operator== ( const CommunicaterThread & rT ) const;
759 bool operator!= ( const CommunicaterThread & rT ) const;
761 //-----------------------------------------------------------------------
762
763 private:
764 //============== Operatoren
765 //-----------------------------------------------------------------------
776 //-----------------------------------------------------------------------
777 };
778 //---------------------------------------------------------------------------
779} // namespace glo
780#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:69
Base class for a thread that executes its work endlessly until aborted.
Definition EuRepeatingThread.h:78
A CommunicaterThread accepts requests for its TableReaderInterface.
Definition GloCommunicaterThread.h:82
void getObjIdFromAllSet(OrderMsg *pOrderMsg)
void takeOrder(OrderMsg *pOrderMsg)
virtual void work() override
std::queue< OrderMsg * > m_MsgQueue
Definition GloCommunicaterThread.h:107
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:95
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:65
This class is used to handle the communication between the application that uses GlobalObjects and Gl...
Definition GloOrderMsg.h:77
The real index as opposed to the TransactionIndexPool, which is created for each transaction
Definition GloIndexPool.h:5151
This class is the interface to a GlobalObjects schema. It contains all class information to store obj...
Definition GloSchemaInterface.h:84
An object of this class accesses tables and reads data records (Record) and binary files (eut::Blob).
Definition GloTableReaderInterface.h:77
Definition GloAbstractBaseLot.h:42