A CommunicaterThread accepts requests for its TableReaderInterface.
More...
#include <GloCommunicaterThread.h>
A CommunicaterThread accepts requests for its TableReaderInterface.
Several TableReaderInterface's can therefore access a table in parallel (they don't break anything).
Used by the Manager and passed to the respective Manager::Receiver.
- Copyright
- © 2010 Helmut Jakoby
- Author
- Helmut Jakoby
◆ CommunicaterThread() [1/3]
glo::CommunicaterThread::CommunicaterThread |
( |
| ) |
|
|
private |
The standard constructor is not available.
◆ CommunicaterThread() [2/3]
Constructor with parameter passing.
- Parameters
-
[in] | pSchema | Is needed to instantiate a table reader. |
[in] | pRealIndexPool | Is needed to instantiate a table reader. |
- See also
- TableReaderInterface
- Exceptions
-
◆ ~CommunicaterThread()
glo::CommunicaterThread::~CommunicaterThread |
( |
| ) |
|
Destructor, the memory is cleared.
◆ CommunicaterThread() [3/3]
The copy constructor is not available.
◆ cancel()
virtual void glo::CommunicaterThread::cancel |
( |
| ) |
|
|
overridevirtual |
Clears the memory before the thread is terminated. Is called by the owning Manager::Receiver before destroying the thread.
Since virtual, this method cannot be called in the destructor.
- Note
- This method only exists when not compiled with POSIX threads (defined (__PTHREADS)).
Reimplemented from eut::RepeatingThread.
◆ checkStored()
void glo::CommunicaterThread::checkStored |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Lets its table reader check whether a persistent object is stored in the database. The result of the query is stored in the request.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::objIDInBase().
◆ clearMsgQueue()
void glo::CommunicaterThread::clearMsgQueue |
( |
| ) |
|
◆ closeAllSet()
void glo::CommunicaterThread::closeAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Lets its table reader destroy a representation of an AllSet. The result of the query is stored in the request.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::closeAllSet().
◆ getAnyIndexedObjIdListFromAllSet()
Help method for getIndexedObjIdListBySearchValueFromAllSet (...), getIndexedObjIdListByComparingFromAllSet (...) and getIndexedObjIdListByRangeFromAllSet (...).
Since the orders differ only in their order structure, this is evaluated here and the respective table reader methods are called.
- Parameters
-
- See also
- OrderMsg, TableReaderInterface::getIndexedObjIdListFromAllSet (...).
◆ getIndexedObjIdListByComparingFromAllSet()
void glo::CommunicaterThread::getIndexedObjIdListByComparingFromAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ getIndexedObjIdListByRangeFromAllSet()
void glo::CommunicaterThread::getIndexedObjIdListByRangeFromAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ getIndexedObjIdListBySearchValueFromAllSet()
void glo::CommunicaterThread::getIndexedObjIdListBySearchValueFromAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ getObjectData()
void glo::CommunicaterThread::getObjectData |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ getObjIdFromAllSet()
void glo::CommunicaterThread::getObjIdFromAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Forwards a read request for an object ID to its table reader via a request (in which the read result is stored)
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- GloOrderMsgm, TableReaderInterface::getObjIdFromAllSet (...), TableReaderInterface::getIndexedObjIdFromAllSet (...).
◆ getReader()
Returns pointers to its table reader.
- Returns
- The pointer to his table reader.
- Attention
- The supplied TableReaderInterface lives only as long as this object, the calling instance must not remove the supplied object from memory.
◆ getRecord()
void glo::CommunicaterThread::getRecord |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ getSizeFromAllSet()
void glo::CommunicaterThread::getSizeFromAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Lets the size request a representation of an AllSet from its table reader. The result of the query is stored in the order.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::getSizeFromAllSet().
◆ objIDInAllSet()
void glo::CommunicaterThread::objIDInAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Lets its table readers check whether a persistent object exists in the database. The result of the query is stored in the order.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::objIDInAllSet().
◆ openAllSet()
void glo::CommunicaterThread::openAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Lets its table reader instantiate a representation of an AllSet. The result of the query is stored in the request.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::openAllSet().
◆ operator!=()
Comparison operator.
- Parameters
-
[in] | rT | The object to be compared with this one. |
◆ operator=()
The assignment operator is not available.
◆ operator==()
Comparison operator.
- Parameters
-
[in] | rT | The object to be compared with this one. |
◆ removeIndexFilter()
void glo::CommunicaterThread::removeIndexFilter |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ setAnyIndexFilterInAllSet()
Help method for setIndexFilterBySearchValueInSet (...), setIndexFilterByComparingInSet (...) and setIndexFilterByRangeInSet (...).
Since the orders differ only in their order structure, this is evaluated here and the respective table reader methods are called.
- Parameters
-
- See also
- GloOrderMsgm, TableReaderInterface::getIndexedObjIdListFromAllSet (...).
◆ setCurrentObjectInAllSet()
void glo::CommunicaterThread::setCurrentObjectInAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
In a representation of an AllSet, lets the table reader set the iterator there to a specific object. The result of the query is stored in the order.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::setCurrentObjectInAllSet().
◆ setIndexFilterByComparingInSet()
void glo::CommunicaterThread::setIndexFilterByComparingInSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ setIndexFilterByRangeInSet()
void glo::CommunicaterThread::setIndexFilterByRangeInSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ setIndexFilterBySearchValueInSet()
void glo::CommunicaterThread::setIndexFilterBySearchValueInSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
◆ setPositionInAllSet()
void glo::CommunicaterThread::setPositionInAllSet |
( |
OrderMsg * | pOrderMsg | ) |
|
|
protected |
Lets the table reader in a representation of an AllSet set set the iterator there to a certain position. The result of the query is stored in the order.
This method is called in work() by evaluating the order.
- Parameters
-
[in,out] | pOrderMsg | The order. |
- See also
- OrderMsg, TableReaderInterface::setPositionInAllSet().
◆ takeOrder()
void glo::CommunicaterThread::takeOrder |
( |
OrderMsg * | pOrderMsg | ) |
|
Accepts an order into its order queue. Sends a wake-up signal for the thread.
- Parameters
-
[in] | pOrderMsg | The order to be processed. |
- See also
- signalInput()
◆ transformIndexStrings()
void glo::CommunicaterThread::transformIndexStrings |
( |
IndexQueryBaseStruct & | rGloIndexQueryBaseStruct | ) |
|
|
protected |
Help method for getAnyIndexedObjIdListFromAllSet (...), and setAnyIndexFilterInAllSet (...).
The above methods are passed one respectively two index strings via the passed IndexQueryBaseStruct. In this method, these are formatted as specified in the index specification. For example, if the index is not to be 'CaseSensitive' and the index is "aBc", this entry in the IndexQueryBaseStruct is changed to "ABC".
- Parameters
-
◆ work()
virtual void glo::CommunicaterThread::work |
( |
| ) |
|
|
overrideprotectedvirtual |
This method is executed as a thread. The message queue is queried for requests (the system 'sleeps' until a message is placed in the queue) and after evaluating the request, a suitable method is called.
- See also
- waitForInput()
Implements eut::RepeatingThread.
◆ m_MsgQueue
std::queue<OrderMsg *> glo::CommunicaterThread::m_MsgQueue |
|
private |
The request queue for this thread.
- See also
- work()
◆ m_pTableReader
The documentation for this class was generated from the following file: