MySQL 9.0.0
Source Code Documentation
lob::plist_node_t Class Reference

The node of page list. More...

#include <lob0impl.h>

Public Member Functions

 plist_node_t (mtr_t *mtr)
 Constructor. More...
 
 plist_node_t ()
 Default constructor. More...
 
 plist_node_t (mtr_t *mtr, byte *frame)
 Constructor. More...
 
 plist_node_t (byte *frame, byte *node)
 Constructor. More...
 
 plist_node_t (byte *frame, byte *node, mtr_t *mtr)
 Constructor. More...
 
 plist_node_t (const plist_node_t &other)=default
 Copy constructor. More...
 
plist_node_toperator= (const plist_node_t &)=default
 
bool is_before (const plist_node_t &node) const
 Check if the current node is before the given node in the page (w.r.t the offset). More...
 
void init ()
 Initialize the current page list node. More...
 
void set_prev (paddr_t addr)
 Set the offset of the previous node. More...
 
void set_prev_node (plist_node_t &prev)
 Set the previous page list node. More...
 
void set_next (paddr_t addr)
 Set the offset of the next node. More...
 
void set_next_node (const plist_node_t &next)
 Set the next page list node. More...
 
paddr_t get_prev () const
 Get the offset of the previous page list node. More...
 
paddr_t get_next () const
 Get the offset of the next page list node. More...
 
plist_node_t get_next_node () const
 Get the next page list node. More...
 
plist_node_t get_prev_node () const
 Get the previous page list node. More...
 
paddr_t addr () const
 Obtain the offset of the page list node within the given page frame. More...
 
byteptr () const
 Obtain the memory location of the page list node. More...
 
bool is_null () const
 Check if the given page list node is null. More...
 
std::ostream & print (std::ostream &out) const
 Print the page list node into the given output stream. More...
 
void set_frame (byte *frame)
 Set the page frame to the given value. More...
 
void set_node (byte *node)
 Set the page list node to the given value. More...
 
void set_mtr (mtr_t *mtr)
 Set the mini-transaction context to the given value. More...
 
byteget_frame () const
 Get the page frame where this page list exists. More...
 
bool is_equal (const plist_node_t &that) const
 

Static Public Attributes

static const uint16_t OFFSET_PREV = 0
 Offset of the previous node. More...
 
static const uint16_t OFFSET_NEXT = 2
 Offset of the next node. More...
 
static const uint8_t SIZE = 4
 The size of a page list node. More...
 

Private Attributes

bytem_frame
 The page frame where this page list exists. More...
 
bytem_node
 The plist node is located at this address. More...
 
mtr_tm_mtr
 The mini-transaction context. More...
 

Detailed Description

The node of page list.

The page list is similar to the file list (flst_node_t) except that it is completely within one page.

Constructor & Destructor Documentation

◆ plist_node_t() [1/6]

lob::plist_node_t::plist_node_t ( mtr_t mtr)
inlineexplicit

Constructor.

Parameters
[in]mtrMini-transaction context.

◆ plist_node_t() [2/6]

lob::plist_node_t::plist_node_t ( )
inline

Default constructor.

◆ plist_node_t() [3/6]

lob::plist_node_t::plist_node_t ( mtr_t mtr,
byte frame 
)
inline

Constructor.

Parameters
[in]mtrMini-transaction context
[in]framethe page frame of this plist.

◆ plist_node_t() [4/6]

lob::plist_node_t::plist_node_t ( byte frame,
byte node 
)
inline

Constructor.

Parameters
[in]framethe page frame of this plist.
[in]nodethe location of plist node.

◆ plist_node_t() [5/6]

lob::plist_node_t::plist_node_t ( byte frame,
byte node,
mtr_t mtr 
)
inline

Constructor.

Parameters
[in]framePage frame where the page list node is located.
[in]nodeLocation of page list node within page frame.
[in]mtrMini-transaction context.

◆ plist_node_t() [6/6]

lob::plist_node_t::plist_node_t ( const plist_node_t other)
default

Copy constructor.

Member Function Documentation

◆ addr()

paddr_t lob::plist_node_t::addr ( ) const
inline

Obtain the offset of the page list node within the given page frame.

Returns
offset from the beginning of the page.

◆ get_frame()

byte * lob::plist_node_t::get_frame ( ) const
inline

Get the page frame where this page list exists.

Returns
the page frame.

◆ get_next()

paddr_t lob::plist_node_t::get_next ( ) const
inline

Get the offset of the next page list node.

Returns
offset of next node of the page list.

◆ get_next_node()

plist_node_t lob::plist_node_t::get_next_node ( ) const
inline

Get the next page list node.

Returns
next node of the page list.

◆ get_prev()

paddr_t lob::plist_node_t::get_prev ( ) const
inline

Get the offset of the previous page list node.

Returns
offset of previous node of the page list.

◆ get_prev_node()

plist_node_t lob::plist_node_t::get_prev_node ( ) const
inline

Get the previous page list node.

Returns
previous node of the page list.

◆ init()

void lob::plist_node_t::init ( void  )
inline

Initialize the current page list node.

The offset of next and previous nodes are set to 0.

◆ is_before()

bool lob::plist_node_t::is_before ( const plist_node_t node) const
inline

Check if the current node is before the given node in the page (w.r.t the offset).

Parameters
[in]nodethe other node.
Returns
true if current node is before the given node.
false if current node is after the given node.

◆ is_equal()

bool lob::plist_node_t::is_equal ( const plist_node_t that) const
inline

◆ is_null()

bool lob::plist_node_t::is_null ( ) const
inline

Check if the given page list node is null.

Returns
true if null, false otherwise.

◆ operator=()

plist_node_t & lob::plist_node_t::operator= ( const plist_node_t )
default

◆ print()

std::ostream & lob::plist_node_t::print ( std::ostream &  out) const
inline

Print the page list node into the given output stream.

Parameters
[in]outthe output stream.
Returns
the output stream.

◆ ptr()

byte * lob::plist_node_t::ptr ( ) const
inline

Obtain the memory location of the page list node.

Returns
the pointer to the page list node.

◆ set_frame()

void lob::plist_node_t::set_frame ( byte frame)
inline

Set the page frame to the given value.

Parameters
[in]framethe page frame

◆ set_mtr()

void lob::plist_node_t::set_mtr ( mtr_t mtr)
inline

Set the mini-transaction context to the given value.

Parameters
[in]mtrMini-transaction context.

◆ set_next()

void lob::plist_node_t::set_next ( paddr_t  addr)
inline

Set the offset of the next node.

Parameters
[in]addrthe offset of next node.

◆ set_next_node()

void lob::plist_node_t::set_next_node ( const plist_node_t next)
inline

Set the next page list node.

Parameters
[in]nextthe next page list node.

◆ set_node()

void lob::plist_node_t::set_node ( byte node)
inline

Set the page list node to the given value.

Parameters
[in]nodethe page list node.

◆ set_prev()

void lob::plist_node_t::set_prev ( paddr_t  addr)
inline

Set the offset of the previous node.

Parameters
[in]addrthe offset of previous node.

◆ set_prev_node()

void lob::plist_node_t::set_prev_node ( plist_node_t prev)
inline

Set the previous page list node.

Parameters
[in]prevthe previous page list node.

Member Data Documentation

◆ m_frame

byte* lob::plist_node_t::m_frame
private

The page frame where this page list exists.

◆ m_mtr

mtr_t* lob::plist_node_t::m_mtr
private

The mini-transaction context.

◆ m_node

byte* lob::plist_node_t::m_node
private

The plist node is located at this address.

◆ OFFSET_NEXT

const uint16_t lob::plist_node_t::OFFSET_NEXT = 2
static

Offset of the next node.

(2 bytes)

◆ OFFSET_PREV

const uint16_t lob::plist_node_t::OFFSET_PREV = 0
static

Offset of the previous node.

(2 bytes)

◆ SIZE

const uint8_t lob::plist_node_t::SIZE = 4
static

The size of a page list node.


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