Class BinaryInMemorySortBuffer

    • Method Detail

      • reset

        public void reset()
        Resets the sort buffer back to the state where it is empty. All contained data is discarded.
      • returnToSegmentPool

        public void returnToSegmentPool()
      • isEmpty

        public boolean isEmpty()
        Checks whether the buffer is empty.
        Returns:
        True, if no record is contained, false otherwise.
      • dispose

        public void dispose()
      • getCapacity

        public long getCapacity()
      • getOccupancy

        public long getOccupancy()
      • write

        public boolean write​(RowData record)
                      throws IOException
        Writes a given record to this sort buffer. The written record will be appended and take the last logical position.
        Parameters:
        record - The record to be written.
        Returns:
        True, if the record was successfully written, false, if the sort buffer was full.
        Throws:
        IOException - Thrown, if an error occurred while serializing the record into the buffers.
      • getIterator

        public MutableObjectIterator<BinaryRowData> getIterator()
        Gets an iterator over all records in this buffer in their logical order.
        Returns:
        An iterator returning the records in their logical order.