org.apache.lucene.util.bkd

## Interface PointWriter

- All Superinterfaces:
    AutoCloseable, Closeable
  All Known Implementing Classes:
    HeapPointWriter, OfflinePointWriter

      public interface PointWriter
      extends 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.
  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(byte[] packedValue, long ord, int docID)` Add a new point
    `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
    `PointReader` | `getSharedReader(long startPoint, long length, List<Closeable> toCloseHeroically)` Returns the single shared reader, used at multiple times during the recursion, to read previously added points

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Method Detail

    - #### append

          void append(byte[] packedValue,
                      long ord,
                      int docID)
               throws IOException

      Add a new point
      Throws:
        `IOException`

    - #### getReader

          PointReader getReader(long startPoint,
                                long length)
                         throws IOException

      Returns a `PointReader` iterator to step through all previously added points
      Throws:
        `IOException`

    - #### getSharedReader

          PointReader getSharedReader(long startPoint,
                                      long length,
                                      List<Closeable> toCloseHeroically)
                               throws IOException

      Returns the single shared reader, used at multiple times during the recursion, to read previously added points
      Throws:
        `IOException`

    - #### destroy

          void destroy()
                throws IOException

      Removes any temp files behind this writer
      Throws:
        `IOException`

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.