Class BinaryIndexedSortable

    • Method Detail

      • nextMemorySegment

        protected MemorySegment nextMemorySegment()
      • checkNextIndexOffset

        protected boolean checkNextIndexOffset()
        check if we need request next index memory.
      • writeIndexAndNormalizedKey

        protected void writeIndexAndNormalizedKey​(RowData record,
                                                  long currOffset)
        Write of index and normalizedKey.
      • compare

        public int compare​(int segmentNumberI,
                           int segmentOffsetI,
                           int segmentNumberJ,
                           int segmentOffsetJ)
        Description copied from interface: IndexedSortable
        Compare records at the given addresses consistent with the semantics of Comparator.compare(Object, Object).
        Specified by:
        compare in interface IndexedSortable
        Parameters:
        segmentNumberI - index of memory segment containing first record
        segmentOffsetI - offset into memory segment containing first record
        segmentNumberJ - index of memory segment containing second record
        segmentOffsetJ - offset into memory segment containing second record
        Returns:
        a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
      • swap

        public void swap​(int i,
                         int j)
        Description copied from interface: IndexedSortable
        Swap items at the given addresses.
        Specified by:
        swap in interface IndexedSortable
      • swap

        public void swap​(int segmentNumberI,
                         int segmentOffsetI,
                         int segmentNumberJ,
                         int segmentOffsetJ)
        Description copied from interface: IndexedSortable
        Swap records at the given addresses.
        Specified by:
        swap in interface IndexedSortable
        Parameters:
        segmentNumberI - index of memory segment containing first record
        segmentOffsetI - offset into memory segment containing first record
        segmentNumberJ - index of memory segment containing second record
        segmentOffsetJ - offset into memory segment containing second record
      • size

        public int size()
        Description copied from interface: IndexedSortable
        Gets the number of elements in the sortable.
        Specified by:
        size in interface IndexedSortable
        Returns:
        The number of elements.
      • recordSize

        public int recordSize()
        Description copied from interface: IndexedSortable
        Gets the size of each record, the number of bytes separating the head of successive records.
        Specified by:
        recordSize in interface IndexedSortable
        Returns:
        The record size
      • recordsPerSegment

        public int recordsPerSegment()
        Description copied from interface: IndexedSortable
        Gets the number of elements in each memory segment.
        Specified by:
        recordsPerSegment in interface IndexedSortable
        Returns:
        The number of records per segment