MySQL 26.7.0
Source Code Documentation
mysql::scheduler::Task_id Class Reference

Represents the identifier of a task ingested by the scheduler,. More...

#include <task_id.h>

Public Member Functions

 Task_id (std::size_t id)
 Creates scheduler task identifier using given id. More...
 
bool operator< (const Task_id &other) const
 Compares tasks ids. More...
 
bool is_valid () const
 Returns an information on whether task id has been set to a valid id. More...
 
uint64_t get () const
 
bool operator== (const Task_id &src) const
 Comparison operator required by unordered set/unordered map... More...
 

Private Attributes

std::size_t m_id
 Internal transaction identifier. More...
 
bool m_is_valid = false
 Id validity, false means that id has not been set. More...
 

Friends

class Scheduler
 
std::ostream & operator<< (std::ostream &os, const Task_id &obj)
 Streaming operator. More...
 

Detailed Description

Represents the identifier of a task ingested by the scheduler,.

Uses an internal sequence number for lightweight, format-agnostic tracking.

Constructor & Destructor Documentation

◆ Task_id()

mysql::scheduler::Task_id::Task_id ( std::size_t  id)

Creates scheduler task identifier using given id.

Note
Uses an internal sequence number as a lightweight identifier, decoupling the scheduler from specific replication formats (e.g., streaming where events may lack traditional identifiers or represent partial units).
Parameters
idInternally assigned sequence number

Member Function Documentation

◆ get()

uint64_t mysql::scheduler::Task_id::get ( ) const
inline

◆ is_valid()

bool mysql::scheduler::Task_id::is_valid ( void  ) const
inline

Returns an information on whether task id has been set to a valid id.

Returns
True in case identifier has been set; false otherwise

◆ operator<()

bool mysql::scheduler::Task_id::operator< ( const Task_id other) const

Compares tasks ids.

Parameters
otherTask id to compare against
Returns
True if this task has lower number than other (was created before)

◆ operator==()

bool mysql::scheduler::Task_id::operator== ( const Task_id src) const

Comparison operator required by unordered set/unordered map...

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Task_id obj 
)
friend

Streaming operator.

◆ Scheduler

friend class Scheduler
friend

Member Data Documentation

◆ m_id

std::size_t mysql::scheduler::Task_id::m_id
private

Internal transaction identifier.

◆ m_is_valid

bool mysql::scheduler::Task_id::m_is_valid = false
private

Id validity, false means that id has not been set.


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