![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
std::map of THD* as key and Srv_session* as value guarded by a read-write lock. More...
Classes | |
| class | Do_Impl | 
Public Member Functions | |
| bool | init () | 
| Initializes the map.  More... | |
| bool | deinit () | 
| Deinitializes the map.  More... | |
| Srv_session * | find (const THD *key) | 
| Searches for an element with in the map.  More... | |
| bool | add (const THD *key, const void *plugin, Srv_session *session) | 
| Add an element to the map.  More... | |
| bool | remove (const THD *key) | 
| Removes an element from the map.  More... | |
| void | remove_all_of_plugin (const void *plugin, unsigned int &removed) | 
| Removes all elements which have been added with plugin as plugin name.  More... | |
| bool | clear () | 
| Empties the map.  More... | |
| unsigned int | size () | 
| Returns the number of elements in the maps.  More... | |
Private Types | |
| typedef std::pair< const void *, Srv_session * > | map_value_t | 
Private Attributes | |
| std::map< const THD *, map_value_t > | collection | 
| bool | initted | 
| bool | psi_initted | 
| mysql_rwlock_t | LOCK_collection | 
| PSI_rwlock_key | key_LOCK_collection | 
std::map of THD* as key and Srv_session* as value guarded by a read-write lock.
RW lock is used instead of a mutex, as find() is a hot spot due to the sanity checks it is used for - when a pointer to a closed session is passed.
      
  | 
  private | 
      
  | 
  inline | 
Add an element to the map.
| key | key | 
| plugin | secondary key | 
| session | object to be added to the collection | 
| false | success | 
| true | failure | 
      
  | 
  inline | 
Empties the map.
      
  | 
  inline | 
Deinitializes the map.
      
  | 
  inline | 
Searches for an element with in the map.
| key | Key of the element | 
| NULL | if not found | 
      
  | 
  inline | 
Initializes the map.
      
  | 
  inline | 
Removes an element from the map.
| key | key | 
      
  | 
  inline | 
Removes all elements which have been added with plugin as plugin name.
| plugin | key | 
| removed | OUT Number of removed elements | 
      
  | 
  inline | 
Returns the number of elements in the maps.
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private |