Fledge
An open source edge computing platform for industrial users
TransactionBoundary Class Reference

This class handles per thread started transaction boundaries: More...

#include <readings_catalogue.h>

Public Member Functions

unsigned long GetMinReadingId ()
 Fetch the minimum safe global reading id among all UNCOMMITTED per thread transactions. More...
 
void SetThreadTransactionStart (std::thread::id tid, unsigned long id)
 Set BEGIN of a transaction for a given thread, reading id. More...
 
void ClearThreadTransaction (std::thread::id)
 Remove committed TRANSACTION for the given thread. More...
 

Detailed Description

This class handles per thread started transaction boundaries:

Member Function Documentation

◆ ClearThreadTransaction()

void TransactionBoundary::ClearThreadTransaction ( std::thread::id  tid)

Remove committed TRANSACTION for the given thread.

Parameters
tidThe thread id that just committed a transaction

◆ GetMinReadingId()

unsigned long TransactionBoundary::GetMinReadingId ( )

Fetch the minimum safe global reading id among all UNCOMMITTED per thread transactions.

Returns
The safe global reading id to use in UNION ALL queries as boundary limit

◆ SetThreadTransactionStart()

void TransactionBoundary::SetThreadTransactionStart ( std::thread::id  tid,
unsigned long  id 
)

Set BEGIN of a transaction for a given thread, reading id.

Parameters
tidThe thread id that just started a transaction
idThe global reading id that starts the transaction

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