MySQL 8.4.2
Source Code Documentation
|
Map with RWLock protections. More...
#include <auth_utility.h>
Public Member Functions | |
Map_with_rw_lock (PSI_rwlock_key key) | |
Map_with_rw_lock (const Map_with_rw_lock &)=delete | |
Map_with_rw_lock (Map_with_rw_lock &&)=delete | |
Map_with_rw_lock & | operator= (const Map_with_rw_lock &)=delete |
Map_with_rw_lock & | operator= (Map_with_rw_lock &&)=delete |
~Map_with_rw_lock () | |
bool | find (const K &key, V &value) |
Search an entry. More... | |
bool | insert (K key, V value) |
Insert an entry. More... | |
void | erase (K key) |
Delete an entry. More... | |
void | clear_if_greater (size_t size) |
Check limit and clear if needed. More... | |
size_t | size () |
Get the size of the map. More... | |
Private Attributes | |
std::map< K, V > | m_map |
Map. More... | |
mysql_rwlock_t | m_lock |
Lock to protect m_map. More... | |
Map with RWLock protections.
|
inline |
|
delete |
|
delete |
|
inline |
|
inline |
Check limit and clear if needed.
[in] | size | Limit to check against |
|
inline |
Delete an entry.
[in] | key | Key to the element to be erased |
|
inline |
Search an entry.
[in] | key | Key |
[out] | value | Value |
false | Entry not found |
true | Entry found. Check value. |
|
inline |
Insert an entry.
[in] | key | Key |
[in] | value | Value |
false | Error |
true | Success |
|
delete |
|
delete |
|
inline |
Get the size of the map.
|
private |
Lock to protect m_map.
|
private |
Map.