MySQL 9.1.0
Source Code Documentation
dblwr::File Struct Reference

Public Member Functions

bool is_odd () const
 Check if the file ID is an odd number. More...
 
bool is_for_lru () const
 Files with odd number as ID are used for LRU batch segments. More...
 
std::string to_json () const noexcept
 Serialize the object into JSON format. More...
 
std::ostream & print (std::ostream &out) const noexcept
 Print this object into the given stream. More...
 

Public Attributes

uint32_t m_id {}
 ID of the file. More...
 
std::string m_name {}
 File name. More...
 
pfs_os_file_t m_pfs {}
 File handle. More...
 

Static Public Attributes

static uint32_t s_n_pages {}
 Number of batched pages per doublwrite file. More...
 

Member Function Documentation

◆ is_for_lru()

bool dblwr::File::is_for_lru ( ) const
inline

Files with odd number as ID are used for LRU batch segments.

Also, only these odd files are used for LRU single segments.

Returns
true if the file is to be used for LRU batch segments.

◆ is_odd()

bool dblwr::File::is_odd ( ) const
inline

Check if the file ID is an odd number.

Returns
true if the file ID is odd.

◆ print()

std::ostream & dblwr::File::print ( std::ostream &  out) const
inlinenoexcept

Print this object into the given stream.

Parameters
[in]outoutput stream into which the current object is printed.
Returns
the output stream.

◆ to_json()

std::string dblwr::File::to_json ( ) const
inlinenoexcept

Serialize the object into JSON format.

Returns
the object in JSON format.

Member Data Documentation

◆ m_id

uint32_t dblwr::File::m_id {}

ID of the file.

◆ m_name

std::string dblwr::File::m_name {}

File name.

◆ m_pfs

pfs_os_file_t dblwr::File::m_pfs {}

File handle.

◆ s_n_pages

uint32_t dblwr::File::s_n_pages {}
static

Number of batched pages per doublwrite file.


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