Class 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 map
      static 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IndexMap

        public IndexMap()
        Deprecated.
    • 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 index
        count - 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 index
        originalIndex - 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