Package com.mongodb.internal.connection
Class IndexMap
java.lang.Object
com.mongodb.internal.connection.IndexMap
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Efficiently maps each integer in a set to another integer in a set, useful for merging bulk write errors when a bulk write must be split into multiple batches. Has the ability to switch from a range-based to a hash-based map depending on the mappings that have been added.
This class should not be considered a part of the public API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract IndexMap
add
(int index, int originalIndex) Deprecated.Add a new index to the mapstatic IndexMap
create()
Deprecated.Create an empty index map.static IndexMap
create
(int startIndex, int count) Deprecated.Create an index map that maps the integers 0..count to startIndex..startIndex + count.abstract int
map
(int index) Deprecated.Return the index that the specified index is mapped to.
-
Constructor Details
-
IndexMap
public IndexMap()Deprecated.
-
-
Method Details
-
create
Deprecated.Create an empty index map.- Returns:
- a new index map
-
create
Deprecated.Create an index map that maps the integers 0..count to startIndex..startIndex + count.- Parameters:
startIndex
- the start indexcount
- the count- Returns:
- an index map
-
add
Deprecated.Add a new index to the map- Parameters:
index
- the indexoriginalIndex
- the original index- Returns:
- an index map with this index added to it
-
map
public abstract int map(int index) Deprecated.Return the index that the specified index is mapped to.- Parameters:
index
- the index- Returns:
- the index it's mapped to
-