Class HeapPointWriter

  • All Implemented Interfaces:
    Closeable, AutoCloseable, PointWriter

    public final class HeapPointWriter
    extends Object
    implements PointWriter
    Utility class to write new points into in-heap arrays.
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • HeapPointWriter

        public HeapPointWriter​(BKDConfig config,
                               int size)
    • Method Detail

      • getPackedValueSlice

        public PointValue getPackedValueSlice​(int index)
        Returns a reference, in result, to the byte[] slice holding this value
      • append

        public void append​(byte[] packedValue,
                           int docID)
        Description copied from interface: PointWriter
        Add a new point from the packed value and docId
        Specified by:
        append in interface PointWriter
      • computeCardinality

        public int computeCardinality​(int from,
                                      int to,
                                      int[] commonPrefixLengths)
        Computes the cardinality of the points between from tp to
      • count

        public long count()
        Description copied from interface: PointWriter
        Return the number of points in this writer
        Specified by:
        count in interface PointWriter
      • destroy

        public void destroy()
        Description copied from interface: PointWriter
        Removes any temp files behind this writer
        Specified by:
        destroy in interface PointWriter