MySQL 8.0.39
Source Code Documentation
|
Class that represents an abstraction of the Resource Group. More...
#include <resource_group.h>
Public Member Functions | |
Resource_group (const std::string &name, const Type type, bool enabled) | |
Construct a Resource_group object. More... | |
const std::string & | name () const |
Type | type () const |
bool | enabled () const |
void | set_type (Type type) |
void | set_enabled (bool enabled) |
Thread_resource_control * | controller () |
const Thread_resource_control * | controller () const |
bool | is_bound_to_threads () |
Check if resource group is associated with threads. More... | |
bool | is_pfs_thread_id_exists (const ulonglong pfs_thread_id) |
Is pfs thread id already exists in the set. More... | |
void | add_pfs_thread_id (const ulonglong pfs_thread_id) |
Add thread_id to the thread id set associated with this resource group. More... | |
void | remove_pfs_thread_id (const ulonglong pfs_thread_id) |
Remove the PFS thread id. More... | |
void | clear () |
Clear the thread id set associated with this resource group. More... | |
void | apply_control_func (std::function< void(ulonglong)> control_func) |
Apply a control function on threads associated with this resource group. More... | |
~Resource_group ()=default | |
Private Member Functions | |
Resource_group (const Resource_group &)=delete | |
Disable copy construction and assignment. More... | |
void | operator= (const Resource_group &)=delete |
Private Attributes | |
std::string | m_name |
Name of the resource group. More... | |
Type | m_type |
Type whether it is user or system resource group. More... | |
bool | m_enabled |
bool flag whether resource is enabled or disabled. More... | |
Thread_resource_control | m_thread_resource_control |
Thread resource controller object. More... | |
std::set< ulonglong > | m_pfs_thread_id_set |
Threads associated with this resource group. More... | |
std::mutex | m_set_mutex |
Mutex protecting the resource group set. More... | |
Class that represents an abstraction of the Resource Group.
It has generic attributes of Resource group name, type, active or inactive, a pointer to a Resource control object.
|
inline |
Construct a Resource_group object.
name | name of the Resource_group. |
type | type of the Resource_group. |
enabled | Check if Resource_group is enabled or not. |
|
default |
|
privatedelete |
Disable copy construction and assignment.
|
inline |
Add thread_id to the thread id set associated with this resource group.
pfs_thread_id | PFS thread id. |
|
inline |
Apply a control function on threads associated with this resource group.
control_func | pointer to Control function. |
|
inline |
Clear the thread id set associated with this resource group.
|
inline |
|
inline |
|
inline |
|
inline |
Check if resource group is associated with threads.
|
inline |
Is pfs thread id already exists in the set.
pfs_thread_id | PFS thread id. |
|
inline |
|
privatedelete |
|
inline |
Remove the PFS thread id.
pfs_thread_id | Remove pfs thread id. |
|
inline |
|
inline |
|
inline |
|
private |
bool flag whether resource is enabled or disabled.
|
private |
Name of the resource group.
|
private |
Threads associated with this resource group.
|
private |
Mutex protecting the resource group set.
|
private |
Thread resource controller object.
|
private |
Type whether it is user or system resource group.