1#ifndef INC_GLOLOCKMANAGER_H
2#define INC_GLOLOCKMANAGER_H
53#include <unordered_map>
814 std::map< TransactionOwner, CommunicatorRightsRestrictions *, std::less<TransactionOwner> >
m_CommunicatorMap;
918 std::stack< ObjID > * pDependObjIdStack,
921 bool bSimulate =
false );
954 std::stack< ObjID > *& prDependObjIdStack,
957 bool bSimulate =
false );
1010 bool bDelete)
const;
1080 std::stack< ObjID > *& prUnlockDependObjIdStack,
1081 std::stack< ObjID > * pLockDependObjIdStack,
1082 bool bSimulate =
false);
1113 int setLockCount( std::list< DependentObjsWithDeepMode * > & rLockCountList,
1114 std::stack< ObjID > *& prUnlockDependObjIdStack,
1115 std::stack< ObjID > * pLockDependObjIdStack,
1117 bool bSimulate =
false );
1257 std::map<
ObjID,
Record *, std::less<ObjID> > & rDependObjects,
1259 const std::string & rsSchemaName,
1262 bool bSimulate =
false );
1292 const std::string & rsSchemaName,
1295 bool bSimulate =
false );
1324 std::map<
ObjID,
Record *, std::less<ObjID> > & rDependObjects,
1348 std::map<
ObjID,
Record *, std::less<ObjID> > & rDependObjects,
1384 std::unordered_map< unsigned long, LockedObject * > & getLockedObjects();
1424 const ObjID & rObjID,
1426 const std::string & rsSchemaName );
Header for Manager Manager::Receiver Manager::ObjIdWithDepends Manager::SchemaMapItem
Header for TransactionOwner
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
Superclass of LocalThread, ClientThread and ServerThread, because they can act as senders and receive...
Definition GloCommunicator.h:93
The individual lock modes of the object with object ID from LockedObject::m_LockObjektID for a commun...
Definition GloLockManager.h:304
std::list< DependentObjsWithDeepMode * > m_READvDELETE_Count
Definition GloLockManager.h:343
bool hasLockTRANSACTION_DELETE()
bool hasReadGuarantee() const
bool hasLockTRANSACTION_WRITE()
std::list< DependentObjsWithDeepMode * > m_TRANSACTION_WRITE_Count
Definition GloLockManager.h:433
~CommunicatorRightsRestrictions()
CommunicatorRightsRestrictions()
bool hasReadProtection() const
bool hasLockREADvDELETE()
std::list< DependentObjsWithDeepMode * > m_TRANSACTION_DELETE_Count
Definition GloLockManager.h:448
std::list< DependentObjsWithDeepMode * > m_EXCLUSIVE_Count
Definition GloLockManager.h:418
std::list< DependentObjsWithDeepMode * > m_READvWRITE_Count
Definition GloLockManager.h:358
void deleteObjectsInList(std::list< DependentObjsWithDeepMode * > *pList)
bool hasLockDELETEvWRITE()
bool hasDeleteProtection() const
bool hasLockDELETEvREAD()
bool hasDeleteGuarantee() const
TransactionOwner m_CommunicatorWithTreadID
Definition GloLockManager.h:328
CommunicatorRightsRestrictions(const TransactionOwner &rCommunicatorWithTreadID)
std::list< DependentObjsWithDeepMode * > m_DELETEvWRITE_Count
Definition GloLockManager.h:388
std::list< DependentObjsWithDeepMode * > m_WRITEvWRITE_Count
Definition GloLockManager.h:373
std::list< DependentObjsWithDeepMode * > m_DELETEvREAD_Count
Definition GloLockManager.h:403
bool hasWriteProtection() const
bool hasWriteGuarantee() const
bool hasLockWRITEvWRITE()
Objects can be locked. Objects of this class represent an object locked by the communicator,...
Definition GloLockManager.h:264
LockedObject(const ObjID &rLockObjekt)
ObjID m_LockObjektID
Definition GloLockManager.h:798
int setLocks(CommunicatorRightsRestrictions *pItem, EnLockMode eLockMode, EnDeepMode eDeepMode, std::stack< ObjID > *&prUnlockDependObjIdStack, std::stack< ObjID > *pLockDependObjIdStack, bool bSimulate=false)
bool isPossible(const TransactionOwner &rCommunicatorWithTreadID, bool bRead, bool bWrite, bool bDelete) const
std::size_t getNumCommunicators()
int lockObject(const TransactionOwner &rCommunicatorWithTreadID, std::stack< ObjID > *pDependObjIdStack, EnLockMode eLockMode, EnDeepMode eDeepMode, bool bSimulate=false)
void deleteCommunicator(Communicator *pCommunicator)
bool hasAnyOtherCompetingProtection(const TransactionOwner &rCommunicatorWithTreadID, EnLockMode eLockMode) const
LockedObject(const LockedObject &)
int unlockObject(const TransactionOwner &rCommunicatorWithTreadID, std::stack< ObjID > *&prDependObjIdStack, EnLockMode eLockMode, EnDeepMode eDeepMode, bool bSimulate=false)
int setLockCount(std::list< DependentObjsWithDeepMode * > &rLockCountList, std::stack< ObjID > *&prUnlockDependObjIdStack, std::stack< ObjID > *pLockDependObjIdStack, EnDeepMode eDeepMode, bool bSimulate=false)
std::map< TransactionOwner, CommunicatorRightsRestrictions *, std::less< TransactionOwner > > m_CommunicatorMap
Definition GloLockManager.h:814
Objects of this class monitor the lock state of persistent objects.
Definition GloLockManager.h:239
LockPossibleSpecification getProcessingPossibilities(const ObjID &rObjID, std::map< ObjID, Record *, std::less< ObjID > > &rDependObjects, const TransactionOwner &rCommunicatorWithTreadID)
Manager * m_pDBManager
Definition GloLockManager.h:1162
LockManager(Manager *pDBManager)
LockManager(const LockManager &)
void sendNotify(TdWatchNotifyMode nWatchNotifyMode, const ObjID &rObjID, Communicator *pCommunicator, const std::string &rsSchemaName)
int unlockObject(const ObjID &rObjID, const TransactionOwner &rCommunicatorWithTreadID, const std::string &rsSchemaName, EnLockMode eLockMode, EnDeepMode eDeepMode, bool bSimulate=false)
void getNotAllowedReadObjects(std::list< ObjID > &rReadLockObjList, const TransactionOwner &rCommunicatorWithTreadID) const
bool isPossible(const ObjID &rObjID, std::map< ObjID, Record *, std::less< ObjID > > &rDependObjects, const TransactionOwner &rCommunicatorWithTreadID, bool bRead, bool bWrite, bool bDelete)
int lockObject(const ObjID &rObjID, std::map< ObjID, Record *, std::less< ObjID > > &rDependObjects, const TransactionOwner &rCommunicatorWithTreadID, const std::string &rsSchemaName, EnLockMode eLockMode, EnDeepMode eDeepMode, bool bSimulate=false)
void deleteAllLocks(Communicator *pCommunicator, const std::string &rsSchemaName)
std::unordered_map< unsigned long, LockedObject * > m_LockedObjectMap
Definition GloLockManager.h:1151
The object of this class is the central point of contact for actions that deal with GlobalObjects dat...
Definition GloManager.h:193
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
Objects of this class transport the data from the tables into the persistent object and from these ag...
Definition GloRecord.h:108
In order to make transactions available not only to a glo::Communicator, but also to individual threa...
Definition GloTransactionOwner.h:81
Definition GloAbstractBaseLot.h:49
EnDeepMode
Definition GloTypes.h:254
EnLockMode
Definition GloTypes.h:1055
unsigned long TdWatchNotifyMode
Definition GloTypes.h:558
Permitted actions in the database such as read, write and delete can be queried for an object....
Definition GloTypes.h:1256