Class PageMetaIO

    • Constructor Detail

      • PageMetaIO

        public PageMetaIO​(int ver)
        Parameters:
        ver - Page format version.
      • PageMetaIO

        protected PageMetaIO​(int type,
                             int ver)
        Parameters:
        type - Type.
        ver - Version.
    • Method Detail

      • initNewPage

        public void initNewPage​(long pageAddr,
                                long pageId,
                                int pageSize,
                                PageMetrics metrics)
        Overrides:
        initNewPage in class PageIO
        Parameters:
        pageAddr - Page address.
        pageId - Page ID.
        pageSize - Page size.
        metrics - Page metrics for tracking page allocation. Can be null if no tracking is required.
        See Also:
        EncryptionSpi.encryptedSize(int)
      • getTreeRoot

        public long getTreeRoot​(long pageAddr)
        Parameters:
        pageAddr - Page address.
        Returns:
        Tree root page.
      • setTreeRoot

        public void setTreeRoot​(long pageAddr,
                                long treeRoot)
        Parameters:
        pageAddr - Page address.
        treeRoot - Tree root
      • getReuseListRoot

        public long getReuseListRoot​(long pageAddr)
        Parameters:
        pageAddr - Page address.
        Returns:
        Reuse list root page.
      • setReuseListRoot

        public void setReuseListRoot​(long pageAddr,
                                     long pageId)
        Parameters:
        pageAddr - Page address.
        pageId - Root page ID.
      • setLastSuccessfulSnapshotId

        @Deprecated
        public void setLastSuccessfulSnapshotId​(long pageAddr,
                                                long lastSuccessfulSnapshotId)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
        lastSuccessfulSnapshotId - Last successful snapshot id.
      • getLastSuccessfulSnapshotId

        @Deprecated
        public long getLastSuccessfulSnapshotId​(long pageAddr)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
      • setLastSuccessfulFullSnapshotId

        @Deprecated
        public void setLastSuccessfulFullSnapshotId​(long pageAddr,
                                                    long lastSuccessfulFullSnapshotId)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
        lastSuccessfulFullSnapshotId - Last successful full snapshot id.
      • getLastSuccessfulFullSnapshotId

        @Deprecated
        public long getLastSuccessfulFullSnapshotId​(long pageAddr)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
      • setNextSnapshotTag

        @Deprecated
        public void setNextSnapshotTag​(long pageAddr,
                                       long nextSnapshotTag)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
        nextSnapshotTag - Next snapshot tag.
      • getLastSuccessfulSnapshotTag

        @Deprecated
        public long getLastSuccessfulSnapshotTag​(long pageAddr)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
      • setLastSuccessfulSnapshotTag

        @Deprecated
        public void setLastSuccessfulSnapshotTag​(long pageAddr,
                                                 long lastSuccessfulSnapshotTag)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
        lastSuccessfulSnapshotTag - Last successful snapshot tag.
      • getNextSnapshotTag

        @Deprecated
        public long getNextSnapshotTag​(long pageAddr)
        Deprecated.
        Will be removed at 3.0. See IGNITE-11139.
        Parameters:
        pageAddr - Page address.
      • setLastAllocatedPageCount

        public void setLastAllocatedPageCount​(long pageAddr,
                                              int pageCnt)
        Sets last allocated pages count, used to save and observe previous allocated count
        Parameters:
        pageAddr - Meta Page address.
        pageCnt - Last allocated pages count to set
      • getLastAllocatedPageCount

        public int getLastAllocatedPageCount​(@NotNull
                                             @NotNull ByteBuffer buf)
        Gets last allocated pages count from given buffer
        Parameters:
        buf - Buffer to read data from.
      • getLastAllocatedPageCount

        public int getLastAllocatedPageCount​(long pageAddr)
        Gets last allocated pages count by provided address
        Parameters:
        pageAddr - Meta page address.
        Returns:
        Last allocated page count
      • setCandidatePageCount

        public boolean setCandidatePageCount​(long pageAddr,
                                             int pageCnt)
        Parameters:
        pageAddr - Page address.
        pageCnt - Last page count.
      • getCandidatePageCount

        public int getCandidatePageCount​(long pageAddr)
        Parameters:
        pageAddr - Page address.
      • getFreeSpace

        public int getFreeSpace​(int pageSize,
                                long pageAddr)
        Count of bytes that is currently free in this page and possibly can be used to place additional payload.
        Specified by:
        getFreeSpace in class PageIO
        Parameters:
        pageSize - Page size.
        pageAddr - Page address.
        Returns:
        Free space.