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

In order to make transactions available not only to a glo::Communicator, but also to individual threads of the glo::Communicator, objects of this class combine the two pieces of information and can thus be used as an indicator.
The same applies to locking objects. More...

#include <GloTransactionOwner.h>

Classes

struct  HashFunction
 

Public Member Functions

 TransactionOwner ()
 
 TransactionOwner (Communicator *pCommunicator, NUM_PTR ipThreadID)
 
 TransactionOwner (const TransactionOwner &rT)
 
virtual ~TransactionOwner ()
 
CommunicatorgetCommunicator () const
 
NUM_PTR getThreadID () const
 
TransactionOwneroperator= (const TransactionOwner &rT)
 
void setAttributes (Communicator *pCommunicator, NUM_PTR ipThreadID)
 
void setCommunicator (Communicator *pCommunicator)
 
void setThreadID (NUM_PTR ipThreadID)
 
bool operator== (const TransactionOwner &rT) const
 Comparison operator.
 
bool operator!= (const TransactionOwner &rT) const
 Comparison operator.
 
bool operator> (const TransactionOwner &rT) const
 The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.
 
bool operator>= (const TransactionOwner &rT) const
 The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.
 
bool operator< (const TransactionOwner &rT) const
 The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.
 
bool operator<= (const TransactionOwner &rT) const
 The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.
 

Private Attributes

NUM_PTR m_ipThreadID
 
Communicatorm_pCommunicator
 

Detailed Description

In order to make transactions available not only to a glo::Communicator, but also to individual threads of the glo::Communicator, objects of this class combine the two pieces of information and can thus be used as an indicator.
The same applies to locking objects.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ TransactionOwner() [1/3]

glo::TransactionOwner::TransactionOwner ( )

Standard constructor.

◆ TransactionOwner() [2/3]

glo::TransactionOwner::TransactionOwner ( Communicator * pCommunicator,
NUM_PTR ipThreadID )

Constructor with parameter passing.

Parameters
[in]pCommunicatorThe address of a Communicator
[in]ipThreadIDThe thread ID of the communicator thread, cast to NUM_PTR, in which a lock or release action or a transaction action was initiated.
See also

◆ TransactionOwner() [3/3]

glo::TransactionOwner::TransactionOwner ( const TransactionOwner & rT)

Copy constructor.

Parameters
[in]rTThe data is copied from this object.

◆ ~TransactionOwner()

virtual glo::TransactionOwner::~TransactionOwner ( )
virtual

Destructor

Member Function Documentation

◆ getCommunicator()

Communicator * glo::TransactionOwner::getCommunicator ( ) const

Returns a pointer to the referenced communicator.

Returns
See above.
See also
m_pCommunicator

◆ getThreadID()

NUM_PTR glo::TransactionOwner::getThreadID ( ) const

Returns the thread ID of the communicator thread, cast to NUM_PTR, in which a lock or release action or a transaction action was initiated.

Returns
See above.
See also
#m_ulBaseID

◆ operator!=()

bool glo::TransactionOwner::operator!= ( const TransactionOwner & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ operator<()

bool glo::TransactionOwner::operator< ( const TransactionOwner & rT) const

The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.

Parameters
[in]rTThe object to be compared with this one.

◆ operator<=()

bool glo::TransactionOwner::operator<= ( const TransactionOwner & rT) const

The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.

Parameters
[in]rTThe object to be compared with this one.

◆ operator=()

TransactionOwner & glo::TransactionOwner::operator= ( const TransactionOwner & rT)

Assignment operator.

Parameters
[in]rTThe data is transferred from this object.

◆ operator==()

bool glo::TransactionOwner::operator== ( const TransactionOwner & rT) const

Comparison operator.

Parameters
[in]rTThe object to be compared with this one.

◆ operator>()

bool glo::TransactionOwner::operator> ( const TransactionOwner & rT) const

The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.

Parameters
[in]rTThe object to be compared with this one.

◆ operator>=()

bool glo::TransactionOwner::operator>= ( const TransactionOwner & rT) const

The size comparison is made from the m_pCommunicator via the m_ipThreadID in this order.

Parameters
[in]rTThe object to be compared with this one.

◆ setAttributes()

void glo::TransactionOwner::setAttributes ( Communicator * pCommunicator,
NUM_PTR ipThreadID )

Sets the attributes of the TransactionOwner.

Parameters
[in]pCommunicatorThe address of a Communicator
[in]ipThreadIDThe thread ID of the communicator thread, cast to NUM_PTR, in which a lock or release action or a transaction action was initiated.
See also

◆ setCommunicator()

void glo::TransactionOwner::setCommunicator ( Communicator * pCommunicator)

Sets the communicator.

Parameters
[in]iCommunicatorThe address of a Communicator.
See also
m_pCommunicator

◆ setThreadID()

void glo::TransactionOwner::setThreadID ( NUM_PTR ipThreadID)

Sets the thread ID.

Parameters
[in]ipThreadIDThe thread ID of the communicator thread, cast to NUM_PTR, in which a lock or release action or a transaction action was initiated.
See also
m_ipThreadID

Member Data Documentation

◆ m_ipThreadID

NUM_PTR glo::TransactionOwner::m_ipThreadID
private

The ThreadID of the communicator thread in which a lock or release action or a transaction action was initiated.
A NUM_PTR is used because it should be possible, for example, to have a 32-bit server work with 64-bit clients.

◆ m_pCommunicator

Communicator* glo::TransactionOwner::m_pCommunicator
private

Pointer in to the communicator that is locking Objects or in a transaction.


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