MySQL 8.4.1
Source Code Documentation
LRUItr Class Reference

Special purpose iterators to be used when scanning the LRU list. More...

#include <buf0buf.h>

Inheritance diagram for LRUItr:
[legend]

Public Member Functions

 LRUItr (const buf_pool_t *buf_pool, const ib_mutex_t *mutex)
 Constructor. More...
 
 ~LRUItr () override=default
 Destructor. More...
 
buf_page_tstart ()
 Selects from where to start a scan. More...
 
- Public Member Functions inherited from LRUHp
 LRUHp (const buf_pool_t *buf_pool, const ib_mutex_t *mutex)
 Constructor. More...
 
 ~LRUHp () override=default
 Destructor. More...
 
void adjust (const buf_page_t *bpage) override
 Adjust the value of hp. More...
 
- Public Member Functions inherited from HazardPointer
 HazardPointer (const buf_pool_t *buf_pool, const ib_mutex_t *mutex)
 Constructor. More...
 
virtual ~HazardPointer ()=default
 Destructor. More...
 
buf_page_tget () const
 Get current value. More...
 
void set (buf_page_t *bpage)
 Set current value. More...
 
bool is_hp (const buf_page_t *bpage)
 Checks if a bpage is the hp. More...
 
void move (const buf_page_t *bpage, buf_page_t *dpage)
 Adjust the value of hp for moving. More...
 

Additional Inherited Members

- Protected Member Functions inherited from HazardPointer
 HazardPointer (const HazardPointer &)
 Disable copying. More...
 
HazardPointeroperator= (const HazardPointer &)
 
- Protected Attributes inherited from HazardPointer
const buf_pool_tm_buf_pool
 Buffer pool instance. More...
 
const ib_mutex_t * m_mutex
 mutex that protects access to the m_hp. More...
 
buf_page_tm_hp
 hazard pointer. More...
 

Detailed Description

Special purpose iterators to be used when scanning the LRU list.

The idea is that when one thread finishes the scan it leaves the itr in that position and the other thread can start scan from there

Constructor & Destructor Documentation

◆ LRUItr()

LRUItr::LRUItr ( const buf_pool_t buf_pool,
const ib_mutex_t *  mutex 
)
inline

Constructor.

Parameters
buf_poolbuffer pool instance
mutexmutex that is protecting the hp.

◆ ~LRUItr()

LRUItr::~LRUItr ( )
overridedefault

Destructor.

Member Function Documentation

◆ start()

buf_page_t * LRUItr::start ( )

Selects from where to start a scan.

If we have scanned too deep into the LRU list it resets the value to the tail of the LRU list.

Returns
buf_page_t from where to start scan.

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