MySQL 9.1.0
Source Code Documentation
Segment Class Reference

File segment of a double write file. More...

Inheritance diagram for Segment:
[legend]

Public Member Functions

 Segment (dblwr::File &file, page_no_t start, uint32_t n_pages)
 Constructor. More...
 
 Segment (dblwr::File &file, uint32_t phy_size, page_no_t start, uint32_t n_pages)
 Constructor. More...
 
virtual ~Segment ()=default
 Destructor. More...
 
void write (const void *ptr, uint32_t len) noexcept
 Write to the segment. More...
 
void flush () noexcept
 Flush the segment to disk. More...
 
 Segment (Segment &&)=delete
 
 Segment (const Segment &)=delete
 
Segmentoperator= (Segment &&)=delete
 
Segmentoperator= (const Segment &)=delete
 

Public Attributes

dblwr::Filem_file
 File that owns the segment. More...
 
uint32_t m_phy_size {}
 Physical page size of each entry/Segment. More...
 
os_offset_t m_start {}
 Physical offset in the file for the segment. More...
 
os_offset_t m_end {}
 Physical offset up to which this segment is responsible for. More...
 

Detailed Description

File segment of a double write file.

Constructor & Destructor Documentation

◆ Segment() [1/4]

Segment::Segment ( dblwr::File file,
page_no_t  start,
uint32_t  n_pages 
)
inline

Constructor.

Parameters
[in]fileFile that owns the segment.
[in]startOffset (page number) of segment in the file.
[in]n_pagesNumber of pages in the segment.

◆ Segment() [2/4]

Segment::Segment ( dblwr::File file,
uint32_t  phy_size,
page_no_t  start,
uint32_t  n_pages 
)
inline

Constructor.

Parameters
[in]fileFile that owns the segment.
[in]phy_sizeSize of an entry in segment
[in]startOffset (page number) of segment in the file.
[in]n_pagesNumber of pages in the segment.

◆ ~Segment()

virtual Segment::~Segment ( )
virtualdefault

Destructor.

◆ Segment() [3/4]

Segment::Segment ( Segment &&  )
delete

◆ Segment() [4/4]

Segment::Segment ( const Segment )
delete

Member Function Documentation

◆ flush()

void Segment::flush ( )
inlinenoexcept

Flush the segment to disk.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

Segment & Segment::operator= ( Segment &&  )
delete

◆ write()

void Segment::write ( const void *  ptr,
uint32_t  len 
)
inlinenoexcept

Write to the segment.

Parameters
[in]ptrStart writing from here.
[in]lenNumber of bytes to write.

Member Data Documentation

◆ m_end

os_offset_t Segment::m_end {}

Physical offset up to which this segment is responsible for.

◆ m_file

dblwr::File& Segment::m_file

File that owns the segment.

◆ m_phy_size

uint32_t Segment::m_phy_size {}

Physical page size of each entry/Segment.

◆ m_start

os_offset_t Segment::m_start {}

Physical offset in the file for the segment.


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