Fully thread‐safe striped hash multimap from KEY to VALUE.
Synopsis
Declared in <bdlcc_stripedunorderedmultimap.h>
template<
class KEY,
class VALUE,
class HASH = bsl::hash<KEY>,
class EQUAL = bsl::equal_to<KEY>>
class StripedUnorderedMultiMap;
Description
This class template defines a fully thread‐safe container that provides a mapping from keys (of template parameter type KEY) to their associated mapped values (of template parameter type VALUE).
The buckets of this hash map are guarded by numStripes reader‐writer locks, a value specified on construction. Partitioning the buckets among several locks allows greater overall concurrency than a bsl::unordered_multimap object guarded by a single lock.
The interface is inspired by, but not identical to that of bsl::unordered_multimap. Notably absent are iterators, which are of limited practicality in the typical use case because they are readily invalidated when the map population is open to modification by multiple threads.
Type Aliases
Name |
Description |
Alias for a predicate that selects values to erase. |
|
Value type of a bulk insert entry. |
|
Alias for a read‐only visitor over element values. |
|
Alias for a visitor that may modify element values. |
Enums
Name |
Description |
Default sizing constants for this multimap. |
Member Functions
Name |
Description |
|
Constructors |
Return the allocator used by this hash map to supply memory. |
|
Return the number of buckets maintained by this hash map. |
|
Return the bucket index where elements with |
|
Return the number of elements in the bucket at the specified |
|
Remove all elements from this hash map. If rehash is in progress, block until it completes. |
|
Prevent future rehash until |
|
Return |
|
Allow rehashing to resume when the load factor is exceeded. |
|
Return a copy of the key‐equality functor used by this hash map. |
|
Erase from this hash map the elements having the specified |
|
Erase from this hash map the elements having the specified |
|
Erase all elements whose keys fall in |
|
Erase the first element found with the specified |
|
Erase the first element with |
|
|
|
Load into |
|
Return (a copy of) the unary hash functor used by this hash map. The return function will generate a hash value (of type |
|
|
|
Insert key‐value pairs from the range |
|
Return |
|
Return the current size divided by the number of buckets. |
|
Return the maximum load factor allowed for this hash map. |
|
Return the number of stripes in the hash. |
|
Recreate this hash map with at least |
|
Invoke |
|
Invoke |
|
Set the value of every element matching |
|
|
|
Return the current number of elements in this hash map. |
|
Call |
|
|
|
|
Created with MrDocs