MySQL 9.1.0
Source Code Documentation
Arch_Dblwr_Ctx Class Reference

Doublewrite buffer context. More...

#include <arch0recv.h>

Public Member Functions

 Arch_Dblwr_Ctx ()=default
 Constructor: Initialize members. More...
 
 ~Arch_Dblwr_Ctx ()
 
dberr_t init (const char *path, const char *base_file, uint num_files, uint64_t file_size)
 Initialize the doublewrite buffer. More...
 
dberr_t read_file ()
 Read the doublewrite buffer file. More...
 
void validate_and_fill_blocks (size_t num_files)
 Validate the blocks contained in the m_buf buffer and load only the valid buffers into m_blocks. More...
 
Arch_Dblwr_Blocks blocks ()
 Get doubewrite buffer blocks. More...
 
 Arch_Dblwr_Ctx (Arch_Dblwr_Ctx const &)=delete
 Disable copy construction. More...
 
Arch_Dblwr_Ctxoperator= (Arch_Dblwr_Ctx const &)=delete
 Disable assignment. More...
 

Private Attributes

bytem_buf {nullptr}
 Buffer to hold the contents of the doublwrite buffer. More...
 
uint64_t m_file_size {}
 Total file size of the file which holds the doublewrite buffer. More...
 
Arch_File_Ctx m_file_ctx
 Doublewrite buffer file context. More...
 
Arch_Dblwr_Blocks m_blocks {}
 List of doublewrite buffer blocks. More...
 

Detailed Description

Doublewrite buffer context.

Constructor & Destructor Documentation

◆ Arch_Dblwr_Ctx() [1/2]

Arch_Dblwr_Ctx::Arch_Dblwr_Ctx ( )
default

Constructor: Initialize members.

◆ ~Arch_Dblwr_Ctx()

Arch_Dblwr_Ctx::~Arch_Dblwr_Ctx ( )
inline

◆ Arch_Dblwr_Ctx() [2/2]

Arch_Dblwr_Ctx::Arch_Dblwr_Ctx ( Arch_Dblwr_Ctx const &  )
delete

Disable copy construction.

Member Function Documentation

◆ blocks()

Arch_Dblwr_Blocks Arch_Dblwr_Ctx::blocks ( )
inline

Get doubewrite buffer blocks.

Returns
doublewrite buffer blocks

◆ init()

dberr_t Arch_Dblwr_Ctx::init ( const char *  path,
const char *  base_file,
uint  num_files,
uint64_t  file_size 
)

Initialize the doublewrite buffer.

Parameters
[in]pathpath to the file
[in]base_filefile name prefix
[in]num_filesinitial number of files
[in]file_sizefile size in bytes
Returns
error code.

◆ operator=()

Arch_Dblwr_Ctx & Arch_Dblwr_Ctx::operator= ( Arch_Dblwr_Ctx const &  )
delete

Disable assignment.

◆ read_file()

dberr_t Arch_Dblwr_Ctx::read_file ( )

Read the doublewrite buffer file.

Returns
error code

◆ validate_and_fill_blocks()

void Arch_Dblwr_Ctx::validate_and_fill_blocks ( size_t  num_files)

Validate the blocks contained in the m_buf buffer and load only the valid buffers into m_blocks.

Parameters
[in]num_filesnumber of files in the group information required to validate the blocks

Member Data Documentation

◆ m_blocks

Arch_Dblwr_Blocks Arch_Dblwr_Ctx::m_blocks {}
private

List of doublewrite buffer blocks.

◆ m_buf

byte* Arch_Dblwr_Ctx::m_buf {nullptr}
private

Buffer to hold the contents of the doublwrite buffer.

◆ m_file_ctx

Arch_File_Ctx Arch_Dblwr_Ctx::m_file_ctx
private

Doublewrite buffer file context.

◆ m_file_size

uint64_t Arch_Dblwr_Ctx::m_file_size {}
private

Total file size of the file which holds the doublewrite buffer.


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