[#BloombergLP-bdlcc-StripedUnorderedMultiMap]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::StripedUnorderedMultiMap
:relfileprefix: ../../
:mrdocs:

Fully thread&hyphen;safe striped hash multimap from `KEY` to `VALUE`&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;stripedunorderedmultimap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY,
    class VALUE,
    class HASH = xref:bsl/hash-06.adoc[bsl::hash&lt;KEY&gt;],
    class EQUAL = xref:bsl/equal_to-0d.adoc[bsl::equal&lowbar;to&lt;KEY&gt;]&gt;
class StripedUnorderedMultiMap;
----

== Description

This class template defines a fully thread&hyphen;safe container that provides a mapping from keys (of template parameter type `KEY`) to their associated mapped values (of template parameter type `VALUE`)&period;

The buckets of this hash map are guarded by `numStripes` reader&hyphen;writer locks, a value specified on construction&period; Partitioning the buckets among several locks allows greater overall concurrency than a `bsl&colon;&colon;unordered&lowbar;multimap` object guarded by a single lock&period;

The interface is inspired by, but not identical to that of `bsl&colon;&colon;unordered&lowbar;multimap`&period; 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&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/EraseIfValuePredicate.adoc[`EraseIfValuePredicate`] 
| Alias for a predicate that selects values to erase&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/KVType.adoc[`KVType`] 
| Value type of a bulk insert entry&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/ReadOnlyVisitorFunction.adoc[`ReadOnlyVisitorFunction`] 
| Alias for a read&hyphen;only visitor over element values&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/VisitorFunction.adoc[`VisitorFunction`] 
| Alias for a visitor that may modify element values&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/_04enum.adoc[`Unnamed enum`] 
| Default sizing constants for this multimap&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/2constructor-09a.adoc[`StripedUnorderedMultiMap`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/allocator.adoc[`allocator`] 
| Return the allocator used by this hash map to supply memory&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/bucketCount.adoc[`bucketCount`] 
| Return the number of buckets maintained by this hash map&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/bucketIndex.adoc[`bucketIndex`] 
| Return the bucket index where elements with `key` are inserted&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/bucketSize.adoc[`bucketSize`] 
| Return the number of elements in the bucket at the specified `index`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/clear.adoc[`clear`] 
| Remove all elements from this hash map&period; If rehash is in progress, block until it completes&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/disableRehash.adoc[`disableRehash`] 
| Prevent future rehash until `enableRehash` is called&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/empty.adoc[`empty`] 
| Return `true` if this hash map contains no elements, and `false` otherwise&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/enableRehash.adoc[`enableRehash`] 
| Allow rehashing to resume when the load factor is exceeded&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/equalFunction.adoc[`equalFunction`] 
| Return a copy of the key&hyphen;equality functor used by this hash map&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/eraseAll.adoc[`eraseAll`] 
| Erase from this hash map the elements having the specified `key`&period; Return the number of elements erased&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/eraseAllIf.adoc[`eraseAllIf`] 
| Erase from this hash map the elements having the specified `key` for which the specified `predicate` holds true&period; Return the number of elements erased&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/eraseBulkAll.adoc[`eraseBulkAll`] 
| Erase all elements whose keys fall in `&lsqb;first, last)&rsqb;`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/eraseFirst.adoc[`eraseFirst`] 
| Erase the first element found with the specified `key`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/eraseFirstIf.adoc[`eraseFirstIf`] 
| Erase the first element with `key` for which `predicate` is true&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/getValueAll-00.adoc[`getValueAll`] 
| `getValueAll` overloads
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/getValueFirst.adoc[`getValueFirst`] 
| Load into `&ast;value` the first value found for the specified `key`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/hashFunction.adoc[`hashFunction`] 
| Return (a copy of) the unary hash functor used by this hash map&period; The return function will generate a hash value (of type `std&colon;&colon;size&lowbar;t`) for a `KEY` object&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/insert-05.adoc[`insert`] 
| `insert` overloads
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/insertBulk.adoc[`insertBulk`] 
| Insert key&hyphen;value pairs from the range `&lsqb;first, last)&rsqb;`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/isRehashEnabled.adoc[`isRehashEnabled`] 
| Return `true` if rehash is enabled, or `false` otherwise&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/loadFactor.adoc[`loadFactor`] 
| Return the current size divided by the number of buckets&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/maxLoadFactor.adoc[`maxLoadFactor`] 
| Return the maximum load factor allowed for this hash map&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/numStripes.adoc[`numStripes`] 
| Return the number of stripes in the hash&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/rehash.adoc[`rehash`] 
| Recreate this hash map with at least `numBuckets` buckets&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/setComputedValueAll.adoc[`setComputedValueAll`] 
| Invoke `visitor` on the value of every element matching `key`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/setComputedValueFirst.adoc[`setComputedValueFirst`] 
| Invoke `visitor` on the value of the first element matching `key`&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/setValueAll.adoc[`setValueAll`] 
| Set the value of every element matching `key`, or insert one&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/setValueFirst-01.adoc[`setValueFirst`] 
| `setValueFirst` overloads
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/size.adoc[`size`] 
| Return the current number of elements in this hash map&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/update.adoc[`update`] 
| Call `visitor` on each element matching `key` until it returns false&period;
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/visit-06.adoc[`visit`] 
| `visit` overloads
| xref:BloombergLP/bdlcc/StripedUnorderedMultiMap/visitReadOnly-0a.adoc[`visitReadOnly`] 
| `visitReadOnly` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
