Package com.mongodb.internal.connection
Class IndexMap
- java.lang.Object
-
- com.mongodb.internal.connection.IndexMap
-
@Deprecated(since="2021-05-27") public abstract class IndexMap extends java.lang.Object
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 Constructor Description IndexMap()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract 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.
-
-
-
Method Detail
-
create
public static IndexMap create()
Deprecated.Create an empty index map.- Returns:
- a new index map
-
create
public static IndexMap create(int startIndex, int count)
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
public abstract IndexMap add(int index, int originalIndex)
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
-
-