Interface PointWriter

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    HeapPointWriter, OfflinePointWriter

    public interface PointWriter
    extends java.io.Closeable
    Appends many points, and then at the end provides a PointReader to iterate those points. This abstracts away whether we write to disk, or use simple arrays in heap.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void append​(byte[] packedValue, int docID)
      Add a new point from the packed value and docId
      void append​(PointValue pointValue)
      Add a new point from a PointValue
      long count()
      Return the number of points in this writer
      void destroy()
      Removes any temp files behind this writer
      PointReader getReader​(long startPoint, long length)
      Returns a PointReader iterator to step through all previously added points
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • append

        void append​(byte[] packedValue,
                    int docID)
             throws java.io.IOException
        Add a new point from the packed value and docId
        Throws:
        java.io.IOException
      • append

        void append​(PointValue pointValue)
             throws java.io.IOException
        Add a new point from a PointValue
        Throws:
        java.io.IOException
      • getReader

        PointReader getReader​(long startPoint,
                              long length)
                       throws java.io.IOException
        Returns a PointReader iterator to step through all previously added points
        Throws:
        java.io.IOException
      • count

        long count()
        Return the number of points in this writer
      • destroy

        void destroy()
              throws java.io.IOException
        Removes any temp files behind this writer
        Throws:
        java.io.IOException