MySQL  8.0.17
Source Code Documentation
Gtid_set::Free_intervals_lock Class Reference

Class representing a lock on free_intervals_mutex. More...

Public Member Functions

 Free_intervals_lock (Gtid_set *_gtid_set)
 Create a new lock, but do not acquire it. More...
 
void lock_if_not_locked ()
 Lock the lock if it is not already locked. More...
 
void unlock_if_locked ()
 Lock the lock if it is locked. More...
 
 ~Free_intervals_lock ()
 Destroy this object and unlock the lock if it is locked. More...
 

Private Attributes

Gtid_setgtid_set
 
bool locked
 

Detailed Description

Class representing a lock on free_intervals_mutex.

This is used by the add_* and remove_* functions. The lock is declared by the top-level function and a pointer to the lock is passed down to low-level functions. If the low-level function decides to access the free intervals list, then it acquires the lock. The lock is then automatically released by the destructor when the top-level function returns.

The lock is not taken if Gtid_set->sid_lock == NULL; such Gtid_sets are assumed to be thread-local.

Constructor & Destructor Documentation

◆ Free_intervals_lock()

Gtid_set::Free_intervals_lock::Free_intervals_lock ( Gtid_set _gtid_set)
inline

Create a new lock, but do not acquire it.

◆ ~Free_intervals_lock()

Gtid_set::Free_intervals_lock::~Free_intervals_lock ( )
inline

Destroy this object and unlock the lock if it is locked.

Member Function Documentation

◆ lock_if_not_locked()

void Gtid_set::Free_intervals_lock::lock_if_not_locked ( )
inline

Lock the lock if it is not already locked.

◆ unlock_if_locked()

void Gtid_set::Free_intervals_lock::unlock_if_locked ( )
inline

Lock the lock if it is locked.

Member Data Documentation

◆ gtid_set

Gtid_set* Gtid_set::Free_intervals_lock::gtid_set
private

◆ locked

bool Gtid_set::Free_intervals_lock::locked
private

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