MySQL 9.0.0
Source Code Documentation
dblwr::Buffer Struct Reference

IO buffer in UNIV_PAGE_SIZE units and aligned on UNIV_PAGE_SIZE. More...

#include <buf0dblwr.h>

Public Member Functions

 Buffer (size_t n_pages) noexcept
 Constructor. More...
 
 Buffer (size_t n_pages, uint32_t phy_size) noexcept
 Constructor. More...
 
 ~Buffer () noexcept
 Destructor. More...
 
bool append (const void *ptr, size_t n_bytes) noexcept
 Add the contents of ptr up to n_bytes to the buffer. More...
 
bytebegin () noexcept
 
const bytebegin () const noexcept
 
size_t size () const noexcept
 
size_t capacity () const noexcept
 
bool empty () const noexcept
 
void clear () noexcept
 Empty the buffer. More...
 
 Buffer (const Buffer &)=delete
 
 Buffer (const Buffer &&)=delete
 
Bufferoperator= (Buffer &&)=delete
 
Bufferoperator= (const Buffer &)=delete
 

Public Attributes

uint32_t m_phy_size
 Page size on disk (aka physical page size). More...
 
bytem_ptr {}
 Write buffer used in writing to the doublewrite buffer, aligned to an address divisible by UNIV_PAGE_SIZE (which is required by Windows AIO) More...
 
bytem_next {}
 Start of next write to the buffer. More...
 
const size_t m_n_bytes {}
 Size of the unaligned (raw) buffer. More...
 

Detailed Description

IO buffer in UNIV_PAGE_SIZE units and aligned on UNIV_PAGE_SIZE.

Constructor & Destructor Documentation

◆ Buffer() [1/4]

dblwr::Buffer::Buffer ( size_t  n_pages)
inlineexplicitnoexcept

Constructor.

Parameters
[in]n_pagesNumber of pages to create

◆ Buffer() [2/4]

dblwr::Buffer::Buffer ( size_t  n_pages,
uint32_t  phy_size 
)
inlineexplicitnoexcept

Constructor.

Parameters
[in]n_pagesNumber of pages to create
[in]phy_sizephysical page size.

◆ ~Buffer()

dblwr::Buffer::~Buffer ( )
inlinenoexcept

Destructor.

◆ Buffer() [3/4]

dblwr::Buffer::Buffer ( const Buffer )
delete

◆ Buffer() [4/4]

dblwr::Buffer::Buffer ( const Buffer &&  )
delete

Member Function Documentation

◆ append()

bool dblwr::Buffer::append ( const void *  ptr,
size_t  n_bytes 
)
inlinenoexcept

Add the contents of ptr up to n_bytes to the buffer.

Returns
false if it won't fit. Nothing is copied if it won't fit.

◆ begin() [1/2]

const byte * dblwr::Buffer::begin ( void  ) const
inlinenoexcept
Returns
the start of the buffer to write from.

◆ begin() [2/2]

byte * dblwr::Buffer::begin ( void  )
inlinenoexcept
Returns
the start of the buffer to write from.

◆ capacity()

size_t dblwr::Buffer::capacity ( ) const
inlinenoexcept
Returns
the capacity of the buffer in bytes.

◆ clear()

void dblwr::Buffer::clear ( )
inlinenoexcept

Empty the buffer.

◆ empty()

bool dblwr::Buffer::empty ( ) const
inlinenoexcept
Returns
true if the buffer is empty.

◆ operator=() [1/2]

Buffer & dblwr::Buffer::operator= ( Buffer &&  )
delete

◆ operator=() [2/2]

Buffer & dblwr::Buffer::operator= ( const Buffer )
delete

◆ size()

size_t dblwr::Buffer::size ( ) const
inlinenoexcept
Returns
the size of of the buffer to write.

Member Data Documentation

◆ m_n_bytes

const size_t dblwr::Buffer::m_n_bytes {}

Size of the unaligned (raw) buffer.

◆ m_next

byte* dblwr::Buffer::m_next {}

Start of next write to the buffer.

◆ m_phy_size

uint32_t dblwr::Buffer::m_phy_size

Page size on disk (aka physical page size).

◆ m_ptr

byte* dblwr::Buffer::m_ptr {}

Write buffer used in writing to the doublewrite buffer, aligned to an address divisible by UNIV_PAGE_SIZE (which is required by Windows AIO)


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