Class ResettableExternalBuffer

  • All Implemented Interfaces:
    Closeable, AutoCloseable, ResettableRowBuffer

    public class ResettableExternalBuffer
    extends Object
    implements ResettableRowBuffer
    A resettable external buffer for binary row. It stores records in memory and spill to disk when memory is not enough. When the spill is completed, the records are written to memory again. The returned iterator reads the data in write order (read spilled records first). It supports infinite length. It can open multiple Iterators. It support new iterator with beginRow.

    NOTE: Not supports reading while writing. In the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.