MySQL 8.0.40
Source Code Documentation
|
Basic Concurrent Map. More...
#include <connection_container.h>
Classes | |
class | Bucket |
Public Types | |
using | key_type = Key |
using | mapped_type = Value |
using | hash_type = Hash |
using | value_type = typename std::map< Key, Value >::value_type |
Public Member Functions | |
concurrent_map (unsigned num_buckets=kDefaultNumberOfBucket, const Hash &hasher=Hash()) | |
concurrent_map (const concurrent_map &other)=delete | |
concurrent_map & | operator= (const concurrent_map &other)=delete |
template<typename Predicate > | |
void | for_one (const Key &key, Predicate &p) |
template<typename Predicate > | |
void | for_each (Predicate p) |
void | put (const Key &key, Value &&value) |
void | erase (const Key &key) |
std::size_t | size () const |
bool | empty () const |
Private Member Functions | |
Bucket & | get_bucket (const Key &key) |
const Bucket & | get_bucket (const Key &key) const |
Private Attributes | |
std::vector< Bucket > | buckets_ |
Hash | hasher_ |
Static Private Attributes | |
static const unsigned | kDefaultNumberOfBucket = 127 |
Basic Concurrent Map.
The concurrent_map is a hash-map, with fixed number of buckets. The number of buckets can be specified in constructor parameter (num_buckets), by default is set to 23.
using concurrent_map< Key, Value, Hash >::hash_type = Hash |
using concurrent_map< Key, Value, Hash >::key_type = Key |
using concurrent_map< Key, Value, Hash >::mapped_type = Value |
using concurrent_map< Key, Value, Hash >::value_type = typename std::map<Key, Value>::value_type |
|
inline |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
delete |
|
inline |
|
inline |
|
private |
|
private |
|
staticprivate |