GlobalObjects
|
The transaction stack of a client communicator for a database. More...
#include <GloTransactionManager.h>
Public Member Functions | |
CommunicatorTransactionStack (Communicator *pCommunicator) | |
~CommunicatorTransactionStack () | |
bool | abortTransaction (std::list< TransactionBase * > &rAbortedTransactionStepList) |
void | beginTransaction () |
bool | commitTransaction () |
Communicator * | getCommunicator () |
std::list< TransactionManager::TransactionBase * > & | getTransactionStack () |
int | setTransactionStep (NUM_PTR &nNewTrxStepAddr, EnStoreDelete eAction, Record *pActionRecord) |
Protected Member Functions | |
CommunicatorTransactionStack () | |
Private Member Functions | |
CommunicatorTransactionStack (const CommunicatorTransactionStack &) | |
TransactionManager::CommunicatorTransactionStack & | operator= (const CommunicatorTransactionStack &) |
Private Attributes | |
int | m_iCurrentTransactionPoint |
Communicator * | m_pCommunicator |
std::list< TransactionBase * > | m_TransactionStack |
The transaction stack of a client communicator for a database.
|
protected |
The default constructor is not available.
glo::TransactionManager::CommunicatorTransactionStack::CommunicatorTransactionStack | ( | Communicator * | pCommunicator | ) |
Constructor with parameter passing.
[in] | pCommunicator | The client communicator that starts the transaction. |
eut::ErrorNException | An exception is thrown if an error occurs. |
glo::TransactionManager::CommunicatorTransactionStack::~CommunicatorTransactionStack | ( | ) |
Destructor, the transaction is aborted and the memory is cleared.
|
private |
The copy constructor is not available.
bool glo::TransactionManager::CommunicatorTransactionStack::abortTransaction | ( | std::list< TransactionBase * > & | rAbortedTransactionStepList | ) |
The transaction stack will be reduced to the TransactionPoint with the current value from m_iCurrentTransactionPoint.
Then the value in m_iCurrentTransactionPoint is decremented. If this is 0,true is returned.
[in,out] | rAbortedTransactionStepList | In this list the rejected TransactionSteps are delivered (must be amongst other things released in the LockManager). |
void glo::TransactionManager::CommunicatorTransactionStack::beginTransaction | ( | ) |
Starts a new transaction by placing a new TransactionPoint on the transaction stack.
bool glo::TransactionManager::CommunicatorTransactionStack::commitTransaction | ( | ) |
The value in m_iCurrentTransactionPoint is decremented. If this is 0, true is returned.
Communicator * glo::TransactionManager::CommunicatorTransactionStack::getCommunicator | ( | ) |
Returns a pointer to the client communicator that started the transaction.
std::list< TransactionManager::TransactionBase * > & glo::TransactionManager::CommunicatorTransactionStack::getTransactionStack | ( | ) |
Returns a reference to the transaction stack.
|
private |
The assignment operator is not available.
int glo::TransactionManager::CommunicatorTransactionStack::setTransactionStep | ( | NUM_PTR & | nNewTrxStepAddr, |
EnStoreDelete | eAction, | ||
Record * | pActionRecord ) |
Generates a TransactionStep and places it on the transaction stack.
[in,out] | nNewTrxStepAddr | The address of the created TransactionStep to manage indexes (see also IndexPool::ObjectStrIndex::m_ReservedIndexMultiMap). |
[in] | eAction | The action how to handle the record; save or delete. |
[in] | pActionRecord | The record to be saved or deleted. The record is copied and not 'remembert'. |
|
private |
The current counter of the last TransactionPoint.
|
private |
The client communicator that started the transaction.
|
private |
The list of individual objects of type TransactionPoint and TransactionStep.