Class PageSnapshot

    • Constructor Detail

      • PageSnapshot

        public PageSnapshot​(FullPageId fullId,
                            byte[] arr,
                            int realPageSize)
        Parameters:
        fullId - Full page ID.
        arr - Read array.
        realPageSize - Page size without encryption overhead.
      • PageSnapshot

        public PageSnapshot​(FullPageId fullPageId,
                            long ptr,
                            int pageSize,
                            int realPageSize)
        This constructor doesn't actually create a page snapshot (copy), it creates a wrapper over page memory region. A created record should not be used after WAL manager writes it to log, since page content can be modified.
        Parameters:
        fullPageId - Full page ID.
        ptr - Pointer to wrap.
        pageSize - Page size.
        realPageSize - Page size without encryption overhead.
    • Method Detail

      • pageData

        public byte[] pageData()
        Returns:
        Snapshot of page data.
      • pageDataSize

        public int pageDataSize()
        Returns:
        Size of page data.
      • pageDataBuffer

        public ByteBuffer pageDataBuffer()
        Returns:
        Page data byte buffer.
      • fullPageId

        public FullPageId fullPageId()
        Returns:
        Full page ID.
      • realPageSize

        public int realPageSize()
        Returns:
        PageSize without encryption overhead.