#include <rpl_commit_stage_manager.h>
◆ Mutex_queue()
Commit_stage_manager::Mutex_queue::Mutex_queue |
( |
| ) |
|
|
inline |
◆ append()
bool Commit_stage_manager::Mutex_queue::append |
( |
THD * |
first | ) |
|
Append a linked list of threads to the queue.
- Parameters
-
[in] | first | Linked list of threads to be appended to queue |
- Return values
-
true | The queue was empty before this operation. |
false | The queue was non-empty before this operation. |
◆ assert_owner()
void Commit_stage_manager::Mutex_queue::assert_owner |
( |
| ) |
|
|
inline |
◆ fetch_and_empty()
THD * Commit_stage_manager::Mutex_queue::fetch_and_empty |
( |
| ) |
|
|
private |
Fetch the entire queue for a stage.
- Return values
-
This | will fetch the entire queue in one go. |
◆ fetch_and_empty_acquire_lock()
THD * Commit_stage_manager::Mutex_queue::fetch_and_empty_acquire_lock |
( |
| ) |
|
Fetch the entire queue for a stage.
It is a wrapper over fetch_and_empty() and acquires queue lock before fetching and emptying the queue threads.
- Returns
- Pointer to the first session of the queue.
◆ fetch_and_empty_skip_acquire_lock()
THD * Commit_stage_manager::Mutex_queue::fetch_and_empty_skip_acquire_lock |
( |
| ) |
|
Fetch the entire queue for a stage.
It is a wrapper over fetch_and_empty(). The caller must acquire queue lock before calling this function.
- Returns
- Pointer to the first session of the queue.
◆ get_leader()
THD * Commit_stage_manager::Mutex_queue::get_leader |
( |
| ) |
|
|
inline |
Fetch the first thread of the queue.
- Returns
- first thread of the queue.
◆ get_size()
int32 Commit_stage_manager::Mutex_queue::get_size |
( |
| ) |
|
|
inline |
Get number of elements in the queue.
- Return values
-
Returns | number of element in the queue. |
◆ init()
void Commit_stage_manager::Mutex_queue::init |
( |
mysql_mutex_t * |
lock | ) |
|
|
inline |
◆ is_empty()
bool Commit_stage_manager::Mutex_queue::is_empty |
( |
| ) |
const |
|
inline |
◆ lock()
void Commit_stage_manager::Mutex_queue::lock |
( |
| ) |
|
|
inline |
◆ pop_front()
std::pair< bool, THD * > Commit_stage_manager::Mutex_queue::pop_front |
( |
| ) |
|
Remove first member from the queue.
- Return values
-
Returns | std::pair<bool, THD *> object. The first boolean value of pair if true determines queue is not empty, and false determines queue is empty. The second value returns the first removed member. |
◆ unlock()
void Commit_stage_manager::Mutex_queue::unlock |
( |
| ) |
|
|
inline |
◆ Commit_stage_manager
◆ m_first
THD* Commit_stage_manager::Mutex_queue::m_first |
|
private |
Pointer to the first thread in the queue, or nullptr if the queue is empty.
◆ m_last
THD** Commit_stage_manager::Mutex_queue::m_last |
|
private |
Pointer to the location holding the end of the queue.
This is either &first
, or a pointer to the next_to_commit
of the last thread that is enqueued.
◆ m_lock
Lock for protecting the queue.
◆ m_size
std::atomic<int32> Commit_stage_manager::Mutex_queue::m_size |
|
private |
The documentation for this class was generated from the following files: