Class BPlusLeafIO<L>

All Implemented Interfaces:
CompactablePageIO
Direct Known Subclasses:
IndexRowLeafIO, LongDataLeafIO, ObjectDataLeafIO

public abstract class BPlusLeafIO<L> extends BPlusIO<L>
Abstract IO routines for B+Tree leaf pages.
  • Constructor Details

    • BPlusLeafIO

      protected BPlusLeafIO(int type, int ver, int itemSize)
      Parameters:
      type - Page type.
      ver - Page format version.
      itemSize - Single item size on page.
  • Method Details

    • getMaxCount

      public int getMaxCount(long pageAddr, int pageSize)
      Specified by:
      getMaxCount in class BPlusIO<L>
      Parameters:
      pageAddr - Page address.
      pageSize - Page size without encryption overhead.
      Returns:
      Max items count.
    • copyItems

      public final void copyItems(long srcPageAddr, long dstPageAddr, int srcIdx, int dstIdx, int cnt, boolean cpLeft) throws IgniteCheckedException
      Copy items from source page to destination page. Both pages must be of the same type and the same version.
      Specified by:
      copyItems in class BPlusIO<L>
      Parameters:
      srcPageAddr - Source page address.
      dstPageAddr - Destination page address.
      srcIdx - Source begin index.
      dstIdx - Destination begin index.
      cnt - Items count.
      cpLeft - Copy leftmost link (makes sense only for inner pages).
      Throws:
      IgniteCheckedException - If failed.
    • offset

      public final int offset(int idx)
      Specified by:
      offset in class BPlusIO<L>
      Parameters:
      idx - Index of element.
      Returns:
      Offset from byte buffer begin in bytes.