Interface PageReadWriteManager

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long allocatePage​(int grpId, int partId, byte flags)
      Allocates a page for the given page space.
      void read​(int grpId, long pageId, ByteBuffer pageBuf, boolean keepCrc)
      Reads a page for the given cache ID.
      PageStore write​(int grpId, long pageId, ByteBuffer pageBuf, int tag, boolean calculateCrc)
      Writes the page for the given cache ID.
    • Method Detail

      • read

        void read​(int grpId,
                  long pageId,
                  ByteBuffer pageBuf,
                  boolean keepCrc)
           throws IgniteCheckedException
        Reads a page for the given cache ID. Cache ID may be 0 if the page is a meta page.
        Parameters:
        grpId - Cache group ID.
        pageId - PageID to read.
        pageBuf - Page buffer to write to.
        keepCrc - Keep CRC flag.
        Throws:
        IgniteCheckedException - If failed to read the page.
      • write

        PageStore write​(int grpId,
                        long pageId,
                        ByteBuffer pageBuf,
                        int tag,
                        boolean calculateCrc)
                 throws IgniteCheckedException
        Writes the page for the given cache ID. Cache ID may be 0 if the page is a meta page.
        Parameters:
        grpId - Cache group ID.
        pageId - Page ID.
        pageBuf - Page buffer to write.
        Throws:
        IgniteCheckedException - If failed to write page.
      • allocatePage

        long allocatePage​(int grpId,
                          int partId,
                          byte flags)
                   throws IgniteCheckedException
        Allocates a page for the given page space.
        Parameters:
        grpId - Cache group ID.
        partId - Partition ID. Used only if flags is equal to PageIdAllocator.FLAG_DATA.
        flags - Page allocation flags.
        Returns:
        Allocated page ID.
        Throws:
        IgniteCheckedException - If IO exception occurred while allocating a page ID.