COAR  1.0
COAR - DMS system
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
trlog Class Reference

#include <trlog.h>

List of all members.

Public Member Functions

int startTransaction ()
 Start of transaction.
int commit ()
 Commit changes.
int rollback (std::vector< entity_id_t > *entitiesToRollback=NULL)
 Commit changes.
bool isInTransaction ()
bool isActive ()
bool isInRollback ()
int insertDataToLog (std::string storageid, int trlogytpe, entity_id_t entid, std::iostream *data, offset_t len)
int insertDataToLog (std::string storageid, int trlogytpe, entity_id_t entid, char *data, offset_t len)
int dumpTransactionLog ()
entity_id_t getActiveTrId ()

Friends

class coar

Member Function Documentation

int trlog::commit ( )

Commit changes.

Description
With this function, we confirs all changes recorded from start of transaction startTransaction .
Returns:
returns 0 if all is OK, else returns -1 and sets coar_errno and coar_errdsc
int trlog::dumpTransactionLog ( )
entity_id_t trlog::getActiveTrId ( )
inline
int trlog::insertDataToLog ( std::string  storageid,
int  trlogytpe,
entity_id_t  entid,
std::iostream *  data,
offset_t  len 
)
int trlog::insertDataToLog ( std::string  storageid,
int  trlogytpe,
entity_id_t  entid,
char *  data,
offset_t  len 
)
bool trlog::isActive ( )
bool trlog::isInRollback ( )
bool trlog::isInTransaction ( )
int trlog::rollback ( std::vector< entity_id_t > *  entitiesToRollback = NULL)

Commit changes.

Description

With this function, we rollback all changes from the point of starting the transaction startTransaction.

Parameters:
entitiesToRollBack- list of entities which will be affected by rollback, if NULL then changes for all transactions will be forbidden
Returns:
returns 0 if all is OK, else returns -1 and sets coar_errno and coar_errdsc
int trlog::startTransaction ( )

Start of transaction.

Description
From this point all changes on paging files are recorded to transaction log. Changes may be committed or rejected by functions commit or rollback
Returns:
returns 0 if all is OK, else returns -1 and sets coar_errno and coar_errdsc

Friends And Related Function Documentation

friend class coar
friend

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