GlobalObjects
Loading...
Searching...
No Matches
glo::WatchNotifyManager Class Reference

Classes to monitor persistent objects and to notify the respective clients of changes. More...

#include <GloWatchNotifyManager.h>

Inheritance diagram for glo::WatchNotifyManager:

Classes

class  ClassWatch
 Monitoring class for AllSets. More...
 
class  ClientWatch
 Monitoring class for client logins and logouts. More...
 
class  CommunicatorCallBackClassIndex
 Is a unique index for maps of CommunicatorClassNotifyModes and as index for the static action lists. More...
 
class  CommunicatorCallBackClientIndex
 Is a unique index for maps of CommunicatorClientNotifyModes and as index for the static action lists. More...
 
class  CommunicatorCallBackIndex
 Base class of a unique index for maps of derived classes of CommunicatorNotifyModes and as index for the static action lists. More...
 
class  CommunicatorCallBackIndexReadWriteIndex
 Is a unique index for maps from CommunicatorCallBackIndexReadWriteIndex and as index for the static action lists. More...
 
class  CommunicatorCallBackObjIndex
 Is a unique index for maps of CommunicatorObjNotifyModes and as index for the static action lists. More...
 
class  CommunicatorClassNotifyModes
 Monitoring or notification mode of AllSets. More...
 
class  CommunicatorClientNotifyModes
 Monitoring or notification mode of client logins and logouts. More...
 
class  CommunicatorIndexReadWriteNotifyModes
 Monitoring or notification mode for read index, write index and reindex actions of the database More...
 
class  CommunicatorNotifyModes
 Basic class of the individual monitoring or notification modes. More...
 
class  CommunicatorObjNotifyModes
 Monitoring or notification mode of objects with their dependent objects. Dependent objects are the embedded or directly loaded objects in pointers and pointer lists. More...
 
class  IndexReadWriteWatch
 Monitoring class for read-index, write-index and reindex actions of the database. More...
 
class  NotifyClientInfo
 Is used for notifying information about clients in a job to the WatchNotifyManager. More...
 
class  NotifyIndexReadWriteInfo
 Is used for Notify-Infos to monitor the reading, writing and reindexing of the indexes in an order to the WatchNotifyManager. More...
 
class  NotifyInfo
 Base class for different Notify-Infos, which are used in a order to the WatchNotifyManager. More...
 
class  NotifyObjInfo
 Is used for notifying information about objects in an order to the WatchNotifyManager. More...
 
class  ObjectWatch
 Monitoring class for objects. More...
 

Public Member Functions

 WatchNotifyManager (Manager *pMyDBManager)
 
virtual ~WatchNotifyManager ()
 
virtual void cancel () override
 
void deleteCommunicatorWatches (Communicator *pCommunicator)
 
void takeOrder (OrderMsg *pOrderMsg)
 
- Public Member Functions inherited from eut::RepeatingThread
 RepeatingThread ()
 
virtual ~RepeatingThread ()
 
virtual void finishBreak ()
 
int getBreakCounter ()
 
bool isInExclusiveAccess () const
 
void setExclusiveAccess ()
 
void signalInput ()
 
virtual int start ()
 
RepeatingThread::STATUS status () const
 
virtual void takeABreak ()
 
bool testCancel ()
 
void unsetExclusiveAccess ()
 
void waitForInput ()
 

Protected Member Functions

 WatchNotifyManager ()
 
void deleteAllAction (Communicator *pCommunicator, std::list< CommunicatorCallBackIndex * > &rActionList)
 
void deleteCommunicatorWatches (OrderMsg *pOrderMsg)
 
bool getClassWatch (ClassWatch *&prClassWatch, unsigned long ulClassID, bool bAlsoGenerate)
 
void processNotify (OrderMsg *pOrderMsg) const
 
void processNotify (OrderMsg *pOrderMsg, std::list< CommunicatorCallBackIndex * > &rActionList) const
 
int processObjectSetWatch (Communicator *pCommunicator, const WatchSpecification &rWatchSpecification, std::list< Manager::ObjIdWithDepends * > &rInputList)
 
int processObjectUnsetWatch (Communicator *pCommunicator, const WatchSpecification &rWatchSpecification, std::list< ObjID > &rInputList)
 
int processWatch (const std::string &rsSchemaName, Communicator *pCommunicator, OrderMsg::EnOrderType eOrderType, void *pOrderObject, void *pAdditionalInfo)
 
void processWatch (OrderMsg *pOrderMsg)
 
void removeClassWatch (unsigned long ulClassID)
 
int setInternWatch (Communicator *pCommunicator, NUM_PTR ipCallBack, const ObjID &rObjID, std::map< ObjID, Record *, std::less< ObjID > > &rDependObjectsMap, TdWatchNotifyMode tdWatchNotifyMode, EnDeepMode eDeepMode)
 
int setInternWatch (Communicator *pCommunicator, NUM_PTR ipCallBack, TdWatchNotifyMode tdWatchNotifyMode)
 
int setInternWatch (Communicator *pCommunicator, NUM_PTR ipCallBack, unsigned long ulClassID, TdWatchNotifyMode tdWatchNotifyMode)
 
int unsetInternWatch (Communicator *pCommunicator, NUM_PTR ipCallBack, const ObjID &rObjID, TdWatchNotifyMode tdWatchNotifyMode, EnDeepMode eDeepMode, bool bSimulate=false)
 
int unsetInternWatch (Communicator *pCommunicator, NUM_PTR ipCallBack, TdWatchNotifyMode tdWatchNotifyMode, bool bSimulate=false)
 
int unsetInternWatch (Communicator *pCommunicator, NUM_PTR ipCallBack, unsigned long ulClassID, TdWatchNotifyMode tdWatchNotifyMode, bool bSimulate=false)
 
int unsetWatchDependObjects (Communicator *pCommunicator, NUM_PTR ipCallBack, std::stack< ObjID > &rDependObjIdStack, TdWatchNotifyMode tdWatchNotifyMode, bool bSimulate)
 
virtual void work () override
 
- Protected Member Functions inherited from eut::RepeatingThread
ORDER getOrder ()
 
STATUS getStatus ()
 
void setStatus (STATUS eStatus)
 
void threadWork ()
 
void toOrder (ORDER eOrder)
 

Static Protected Member Functions

static void insertAction (CommunicatorCallBackIndex *pCommunicatorCallBackIndex, std::list< CommunicatorCallBackIndex * > &rActionList)
 
static void removeAction (CommunicatorCallBackIndex *pCommunicatorCallBackIndex, std::list< CommunicatorCallBackIndex * > &rActionList)
 

Static Protected Attributes

static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_CLIENT_CLOSEBASE_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_CLIENT_CONNECTSERVER_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_CLIENT_DISCONNECTSERVER_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_CLIENT_OPENBASE_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_DELETE_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_INDEX_READ_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_INDEX_REINDEX_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_INDEX_WRITE_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_INSERT_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_LOCK_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_READ_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_UNLOCK_List
 
static std::list< WatchNotifyManager::CommunicatorCallBackIndex * > m_WNM_WRITE_List
 

Private Member Functions

 WatchNotifyManager (const WatchNotifyManager &)
 
WatchNotifyManageroperator= (const WatchNotifyManager &)
 

Private Attributes

std::map< unsigned long, ClassWatch *, std::less< unsigned long > > m_ClassWatchMap
 
ClientWatch m_ClientWatch
 
eut::CriticalSection m_ExclusiveProcessingSection
 
IndexReadWriteWatch m_IndexReadWriteWatch
 
std::queue< OrderMsg * > m_MsgQueue
 
Managerm_pMyDBManager
 

Additional Inherited Members

- Public Types inherited from eut::RepeatingThread
enum  EuTHREADERROR { EuTHREAD_ERR_NO_THREAD = -10301 , EuTHREAD_ERR_THREAD_ALREADY_WORKING = -10302 , EuTHREAD_ERR_THREAD_BREAK_COUNT_LESS_THAN_ZERO = -10303 , EuTHREAD_ERR_UNKNOWN = -10400 }
 Error range = -10301 to -10400 More...
 
enum  ORDER { eUNDEFINED , eDO_WORK , eEXIT }
 
enum  STATUS {
  eAT_THE_START , eWORKING , ePAUSING , eENDING ,
  eCOMPLETED
}
 
- Public Attributes inherited from eut::RepeatingThread
std::string m_strDebugInfo
 

Detailed Description

Classes to monitor persistent objects and to notify the respective clients of changes.

What can be monitored:

You can register Objects, ObjectSets and AllSets for monitoring.

You can monitor the 'Read', 'Write', 'Delete', 'Lock', 'Release' and for AllSets the 'Insert' of an object.

You can monitor the logon and logoff of a Client to a database or GloServer.

You can monitor the progress of reading or writing and the reindexing of the Indexes as well as the progress of compressing a database.

The watching pattern:

- AllSet
For each object to be monitored (Object ID) or AllSet (Class ID) a ClassWatch, which itself has a notification list of CommunicatorClassNotifyModes, is instantiated and inserted into the m_ClassWatchMap.

- Object
If a Object is to be observed, an ObjectWatch, which itself has a notification list of CommunicatorObjectNotifyModes, is additionally instantiated and inserted into the ClassWatch::m_ObjectWatchMap.

- Client
If the logon or logoff of a Client to a GloServer or to a database is to be monitored, a ClientWatch, which itself has a notification list of CommunicatorClientNotifyModes, is instantiated and inserted into m_ClientWatch.

- Index
If the progress of reading or writing the Indexes is to be monitored, an IndexReadWriteWatch, which itself has a notification list of CommunicatorIndexReadWriteNotifyModes, is instantiated and inserted into m_IndexReadWriteWatch.

- Compress
If the progress of compressing a database is to be monitored, an IndexReadWriteWatch, which itself has a notification list of CommunicatorIndexReadWriteNotifyModes, is instantiated and added to m_IndexReadWriteWatch.

- CommunicatorClassNotifyModes
Objects of the class CommunicatorClassNotifyModes are unique by means of a reference to Communicator and an index (which can be used to notify the Communicator several times in an index-specific manner).

CommunicatorClassNotifyModes have a counter for each watch notify mode, which can be incremented or decremented (this means that each communicator is notified only once for each index).

- CommunicatorObjNotifyModes
CommunicatorObjNotifyModes are structured slightly differently. Since an object can be monitored with its dependent objects, for example, objects are passed with their dependent objects for monitoring.

For each monitoring mode there is a WatchModeList, in which the list of dependent objects with the monitoring depth is stored. If an object with a particular monitoring mode and monitoring depth is no longer to be monitored, the list is removed from the WatchModeList and any objects with the same monitoring mode are no longer monitored.

This is necessary because, for example, an object 'A' is monitored with a referenced object 'B'. The application can now dereference the referenced object 'B' in object 'A'. If the observation of object 'A' is removed, the previously referenced object 'B' is no longer linked in Basis and would otherwise no longer be released.

If all watch modes are set to 0, theCommunicatorNotifyModes object is removed from the respective list and deleted.

- CommunicatorClientNotifyModes
- CommunicatorIndexReadWriteNotifyModes
Objects of the classes CommunicatorClientNotifyModes and CommunicatorIndexReadWriteNotifyModes are unique by reference to Communicator.

Examples

Example 1: For example, if an AllSet is to be monitored, the ClassWatch with the same ClassID is searched for in the m_ClassWatchMap. If no corresponding ClassWatch exists, one is created and placed in the m_ClassWatchMap.

Example 2: If, for example, an object is to be monitored, the ClassWatch with the same ClassID is searched for in the m_ClassWatchMap. If no corresponding ClassWatch exists, one will be created and placed in the m_ClassWatchMap.

If a ClassWatch exists or is created, a CommunicatorNotifyModes with the Communicator and its index is searched in its notification list and the monitoring mode is set there, otherwise a new CommunicatorNotifyModes is inserted.

If an ObjectWatch exists or is created, a CommunicatorObjNotifyModes with the Communicator and its index is searched in its ObjectWatch::m_CommunicatorObjNotifyModesMap and the monitoring mode is set there, otherwise a new CommunicatorObjNotifyModes is inserted.

Interaction with glo::Manager

Notifications are not initiated directly by the glo::Manager, but are passed on to the WatchNotifyManager via a job, which takes over the notification. In the order are the communicator that triggers the notification, the order type (here OrderMsg::ePROCESS_NOTIFY), the action with the order object (an object ID) in a NotifyInfo and in ZusatzInfo a communicator if necessary.

The WatchNotifyManager checks who wants to be notified about the action on an object and sends an order to them (unless there was a communicator in ZusatzInfo, then only to this communicator) via the glo::Manager (then order type OrderMsg::eNOTIFY_CLIENT ).

The order contains the communicator to be notified, and in a NotifyNote the communicator that triggered the action, the affected object ID and the action.

See also
Watch and notify.
See also
TdWatchNotifyMode
Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ WatchNotifyManager() [1/3]

glo::WatchNotifyManager::WatchNotifyManager ( )
protected

The standard constructor is not available.

◆ WatchNotifyManager() [2/3]

glo::WatchNotifyManager::WatchNotifyManager ( Manager * pMyDBManager)

Constructor with parameter passing.

Parameters
[in]pMyDBManagerBackreference to the owning Manager, must not be removed from memory during the lifetime of this object.

◆ ~WatchNotifyManager()

virtual glo::WatchNotifyManager::~WatchNotifyManager ( )
virtual

Destructor, cleaning up.

◆ WatchNotifyManager() [3/3]

glo::WatchNotifyManager::WatchNotifyManager ( const WatchNotifyManager & )
private

The copy constructor is not available.

Member Function Documentation

◆ cancel()

virtual void glo::WatchNotifyManager::cancel ( )
overridevirtual

When the thread ends, this virtual method is called. The MsgQueue is cleaned up here.

Note
This method only exists when not compiled with POSIX threads (defined (__PTHREADS)).

Reimplemented from eut::RepeatingThread.

◆ deleteAllAction()

void glo::WatchNotifyManager::deleteAllAction ( Communicator * pCommunicator,
std::list< CommunicatorCallBackIndex * > & rActionList )
protected

Help method for deleteCommunicatorWatches( OrderMsg * ).

All watches of the passed client communicator are removed.

Only the passed list of objects of the type CommunicatorCallBackIndex, which can be used to notify the individual clients about the individual actions, is taken into account.

Parameters
[in]pCommunicatorThe client communicator whose monitoring is to be removed.
[in,out]rActionListList of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified about the individual actions.

◆ deleteCommunicatorWatches() [1/2]

void glo::WatchNotifyManager::deleteCommunicatorWatches ( Communicator * pCommunicator)

Processes a client communicator delete order from its queue with the orders to be processed.

All monitoring of the client communicator referenced in the order is removed.

All lists of objects of the type CommunicatorCallBackIndex are taken into account.

Parameters
[in]pCommunicatorThe client communicator.

◆ deleteCommunicatorWatches() [2/2]

void glo::WatchNotifyManager::deleteCommunicatorWatches ( OrderMsg * pOrderMsg)
protected

Processes a client communicator delete order from its queue with the orders to be processed.

All monitoring of the client communicator referenced in the order is removed.

All lists of objects of the type CommunicatorCallBackIndex are taken into account.

The original order is removed from the memory.

Parameters
[in]pOrderMsgThe order.

◆ getClassWatch()

bool glo::WatchNotifyManager::getClassWatch ( ClassWatch *& prClassWatch,
unsigned long ulClassID,
bool bAlsoGenerate )
protected

In prClassWatch, returns an existing or a new monitoring object for an AllSet with a passed class ID. In any case, the returned monitoring object is in the m_ClassWatchMap.

Parameters
[in,out]prClassWatchThe existing or new monitoring object for the AllSet with passed class ID.
[in]ulClassIDThe class ID.
[in]bAlsoGenerateIf true, a new monitoring object for AllSet is then generated and inserted into the m_ClassWatchMap if it does not already exist.
If false, only an already existing monitoring object for AllSet is delivered.
Returns
If true, an already existing monitoring object for AllSet was delivered, otherwise none or a new one.

◆ insertAction()

static void glo::WatchNotifyManager::insertAction ( CommunicatorCallBackIndex * pCommunicatorCallBackIndex,
std::list< CommunicatorCallBackIndex * > & rActionList )
staticprotected

Inserts a CommunicatorCallBackIndex into the passed list at the beginning.

Parameters
[in]pCommunicatorCallBackIndexCommunicatorCallBackIndex to be inserted.
[in,out]rActionListThe list.

◆ operator=()

WatchNotifyManager & glo::WatchNotifyManager::operator= ( const WatchNotifyManager & )
private

The assignment operator is not available.

◆ processNotify() [1/2]

void glo::WatchNotifyManager::processNotify ( OrderMsg * pOrderMsg) const
protected

Processes a notification order from its queue with the orders to be processed.

If necessary, several new notification requests are created and sent to the relevant client communicators.

All lists of objects of the type CommunicatorCallBackIndex are taken into account.

The original order is removed from the memory.

Parameters
[in]pOrderMsgThe order.

◆ processNotify() [2/2]

void glo::WatchNotifyManager::processNotify ( OrderMsg * pOrderMsg,
std::list< CommunicatorCallBackIndex * > & rActionList ) const
protected

Processes a notification order from its queue with the orders to be processed.

If necessary, several new notification requests are created and sent to the relevant client communicators.

Only the passed list of objects of the type CommunicatorCallBackIndex, via which the individual Clients can be notified about the individual actions, is considered.

The original order is removed from the memory.

Parameters
[in]pOrderMsgThe order.
[in,out]rActionListList of objects of the type CommunicatorCallBackIndex with which the individual clients can be notified of the individual actions.

◆ processObjectSetWatch()

int glo::WatchNotifyManager::processObjectSetWatch ( Communicator * pCommunicator,
const WatchSpecification & rWatchSpecification,
std::list< Manager::ObjIdWithDepends * > & rInputList )
protected

Processes a watch of the passed objects.

Parameters
[in]pCommunicatorThe client communicator that wants to monitor.
[in]rWatchSpecificationThe 'watching mode', the 'watching depth' and the 'notification object'
[in]rInputListThe object records to watch.
Returns
A return < 0 indicates an error.

◆ processObjectUnsetWatch()

int glo::WatchNotifyManager::processObjectUnsetWatch ( Communicator * pCommunicator,
const WatchSpecification & rWatchSpecification,
std::list< ObjID > & rInputList )
protected

Processes aunwatch of the passed objects.

Parameters
[in]pCommunicatorThe client communicator that wants to monitor.
[in]rWatchSpecificationThe 'watching mode', the 'watching depth' and the 'notification object'
[in]rInputListThe object IDs of the objects whose watching is to be stopped.
Returns
A return < 0 indicates an error.

◆ processWatch() [1/2]

int glo::WatchNotifyManager::processWatch ( const std::string & rsSchemaName,
Communicator * pCommunicator,
OrderMsg::EnOrderType eOrderType,
void * pOrderObject,
void * pAdditionalInfo )
protected

Processes a monitoring order or a monitoring cancel order.

Parameters
[in]rsSchemaNameThe schema name.
[in]pCommunicatorThe client communicator that wants to initiate or cancel watching.
[in]eOrderTypeThe type of watching.
[in]pOrderObjectDepending on the eOrderType, different types or NULL_PTR.
[in]pAdditionalInfoThe 'Watch Mode', 'Watch Depth' and 'Notification Object' are always of type WatchSpecification or NULL_PTR.
Returns
A return < 0 indicates an error.

◆ processWatch() [2/2]

void glo::WatchNotifyManager::processWatch ( OrderMsg * pOrderMsg)
protected

Processes a monitoring order or a monitoring cancel order from its queue with the orders to be processed.

After processing, any existing result values are set and the order is returned to the communicator.

Parameters
[in]pOrderMsgThe order.

◆ removeAction()

static void glo::WatchNotifyManager::removeAction ( CommunicatorCallBackIndex * pCommunicatorCallBackIndex,
std::list< CommunicatorCallBackIndex * > & rActionList )
staticprotected

Removes a CommunicatorCallBackIndex from the passed list.

Parameters
[in]pCommunicatorCallBackIndexCommunicatorCallBackIndex to be removed.
[in,out]rActionListThe list.

◆ removeClassWatch()

void glo::WatchNotifyManager::removeClassWatch ( unsigned long ulClassID)
protected

Removes and deletes the monitoring object for the AllSet with passed class ID from m_ClassWatchMap

Parameters
[in]ulClassIDThe class ID.

◆ setInternWatch() [1/3]

int glo::WatchNotifyManager::setInternWatch ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
const ObjID & rObjID,
std::map< ObjID, Record *, std::less< ObjID > > & rDependObjectsMap,
TdWatchNotifyMode tdWatchNotifyMode,
EnDeepMode eDeepMode )
protected

Registers a monitoring for an object with possibly dependent objects.

Parameters
[in]pCommunicatorThe client communicator that wants to monitor.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]rObjIDThe object to be monitored.
[in]rDependObjectsMapThe dependent objects that are 'co-monitored' by the calling instance.
[in]tdWatchNotifyModeThe desired monitoring mode.
[in]eDeepModeThe monitoring depth mode to keep the individual DependentObjsWithDeepMode objects apart.
Returns
A return < 0 indicates an error.

◆ setInternWatch() [2/3]

int glo::WatchNotifyManager::setInternWatch ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
TdWatchNotifyMode tdWatchNotifyMode )
protected

Registers a client logon-, client logoff-, read index-, write index- or reindex-monitoring.

Parameters
[in]pCommunicatorThe client communicator that wants to monitor.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]tdWatchNotifyModeThe desired monitoring mode.
Returns
A return < 0 indicates an error.

◆ setInternWatch() [3/3]

int glo::WatchNotifyManager::setInternWatch ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
unsigned long ulClassID,
TdWatchNotifyMode tdWatchNotifyMode )
protected

Registers a monitoring for its AllSet.

Parameters
[in]pCommunicatorThe client communicator that wants to monitor.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]ulClassIDThe class ID of the AllSet to be monitored.
[in]tdWatchNotifyModeThe desired monitoring mode.
Returns
A return < 0 indicates an error.

◆ takeOrder()

void glo::WatchNotifyManager::takeOrder ( OrderMsg * pOrderMsg)

Accepts an order.

Parameters
[in]pOrderMsgThe order to be processed.

◆ unsetInternWatch() [1/3]

int glo::WatchNotifyManager::unsetInternWatch ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
const ObjID & rObjID,
TdWatchNotifyMode tdWatchNotifyMode,
EnDeepMode eDeepMode,
bool bSimulate = false )
protected

Deregisters a monitoring for an object with possibly dependent objects.

Parameters
[in]pCommunicatorThe client communicator that wants to remove monitoring.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]rObjIDThe object ID of the object to be monitored.
[in]tdWatchNotifyModeThe original desired monitoring mode.
[in]eDeepModeThe original monitoring depth mode to keep the individual DependentObjsWithDeepMode objects apart.
[in]bSimulateIf true, only simulation is performed, no value is set, but a result or error is returned.
Returns
A return value > 0 indicates that the monitoring mode was switched off; however, there are still as many monitoring modes as specified in the return value.
A return == 0 indicates that the monitoring mode has been switched off and there are no further monitoring modes!
A return value < 0 indicates an error.

◆ unsetInternWatch() [2/3]

int glo::WatchNotifyManager::unsetInternWatch ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
TdWatchNotifyMode tdWatchNotifyMode,
bool bSimulate = false )
protected

Deregisters a monitoring for a client logon-, client logoff-, read index-, write index- or reindex

Parameters
[in]pCommunicatorThe client communicator that wants to remove monitoring.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]tdWatchNotifyModeThe desired monitoring mode.
[in]bSimulateIf true, only simulation is performed, no value is set, but a result or error is returned.
Returns
A return value > 0 indicates that the monitoring mode was switched off; however, there are still as many monitoring modes as specified in the return value.
A return == 0 indicates that the monitoring mode has been switched off and there are no further monitoring modes!
A return value < 0 indicates an error.

◆ unsetInternWatch() [3/3]

int glo::WatchNotifyManager::unsetInternWatch ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
unsigned long ulClassID,
TdWatchNotifyMode tdWatchNotifyMode,
bool bSimulate = false )
protected

Deregisters a monitoring for an AllSet.

Parameters
[in]pCommunicatorThe client communicator that wants to remove monitoring.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]ulClassIDThe class ID of the AllSet to be monitored.
[in]tdWatchNotifyModeThe desired monitoring mode.
[in]bSimulateIf true, only simulation is performed, no value is set, but a result or error is returned.
Returns
A return value > 0 indicates that the monitoring mode was switched off; however, there are still as many monitoring modes as specified in the return value.
A return == 0 indicates that the monitoring mode has been switched off and there are no further monitoring modes!
A return value < 0 indicates an error.

◆ unsetWatchDependObjects()

int glo::WatchNotifyManager::unsetWatchDependObjects ( Communicator * pCommunicator,
NUM_PTR ipCallBack,
std::stack< ObjID > & rDependObjIdStack,
TdWatchNotifyMode tdWatchNotifyMode,
bool bSimulate )
protected

Help method to unregister the monitoring of dependent objects individually.

Parameters
[in]pCommunicatorThe client communicator that wants to remove monitoring.
[in]ipCallBackThe address of the CallBack function of the client communicator.
[in]rDependObjIdStackList of object IDs of the monitored dependent objects.
[in]tdWatchNotifyModeThe watch mode to be canceled.
[in]bSimulateIf true, only simulation is performed, no value is set, but a result or error is returned.
Returns
A return value > 0 indicates that the monitoring mode was switched off; however, there are still as many monitoring modes as specified in the return value.
A return == 0 indicates that the monitoring mode has been switched off and there are no further monitoring modes!
A return value < 0 indicates an error.

◆ work()

virtual void glo::WatchNotifyManager::work ( )
overrideprotectedvirtual

This method is executed as a thread. The message queue is queried for requests and replies to its own requests (the system 'sleeps' until a message is placed in the queue).

See also
EuEndlessPThread, EuAPThread::work().

Implements eut::RepeatingThread.

Member Data Documentation

◆ m_ClassWatchMap

std::map< unsigned long, ClassWatch *, std::less<unsigned long> > glo::WatchNotifyManager::m_ClassWatchMap
private

All ClassWatch sorted by class ID.

◆ m_ClientWatch

ClientWatch glo::WatchNotifyManager::m_ClientWatch
private

For monitoring client logon and logoff.

◆ m_ExclusiveProcessingSection

eut::CriticalSection glo::WatchNotifyManager::m_ExclusiveProcessingSection
private

Is required to define access protected areas by RepeatingThread::insetExclusiveAccess() or RepeatingThread::unsetExclusiveAccess().

◆ m_IndexReadWriteWatch

IndexReadWriteWatch glo::WatchNotifyManager::m_IndexReadWriteWatch
private

For monitoring index read/write/re-index and compressing a database.

◆ m_MsgQueue

std::queue< OrderMsg * > glo::WatchNotifyManager::m_MsgQueue
private

The queue with the orders to be processed.

◆ m_pMyDBManager

Manager* glo::WatchNotifyManager::m_pMyDBManager
private

Back reference to the owning Manager.

◆ m_WNM_CLIENT_CLOSEBASE_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_CLIENT_CLOSEBASE_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via client logoff actions to a database.

◆ m_WNM_CLIENT_CONNECTSERVER_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_CLIENT_CONNECTSERVER_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via client logon actions to a GloServer.

◆ m_WNM_CLIENT_DISCONNECTSERVER_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_CLIENT_DISCONNECTSERVER_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via client logoff actions to a GloServer.

◆ m_WNM_CLIENT_OPENBASE_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_CLIENT_OPENBASE_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via client logon actions to a database.

◆ m_WNM_DELETE_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_DELETE_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via delete actions on AllSets and objects.

◆ m_WNM_INDEX_READ_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_INDEX_READ_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via read actions to a database.

◆ m_WNM_INDEX_REINDEX_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_INDEX_REINDEX_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via reindex actions to a database.

◆ m_WNM_INDEX_WRITE_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_INDEX_WRITE_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via write actions to a database.

◆ m_WNM_INSERT_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_INSERT_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via insert actions on AllSets and objects.

◆ m_WNM_LOCK_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_LOCK_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via lock actions on AllSets and objects.

◆ m_WNM_READ_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_READ_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via read actions on AllSets and objects.

◆ m_WNM_UNLOCK_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_UNLOCK_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via unlock actions on AllSets and objects.

◆ m_WNM_WRITE_List

std::list<WatchNotifyManager::CommunicatorCallBackIndex *> glo::WatchNotifyManager::m_WNM_WRITE_List
staticprotected

List of objects of the type CommunicatorCallBackIndex via which the individual clients can be notified via write actions on AllSets and objects.


The documentation for this class was generated from the following file: