Class MappedPageImpl

    • Method Detail

      • setNew

        public void setNew​(boolean isNew)
      • isNew

        public boolean isNew()
        Description copied from interface: IMappedPage
        Is the mapped page new or was it read from disk
        Specified by:
        isNew in interface IMappedPage
        Returns:
        true if no file on disk existed
      • setDirty

        public void setDirty​(boolean dirty)
        Description copied from interface: IMappedPage
        Set if the mapped page has been changed or not
        Specified by:
        setDirty in interface IMappedPage
        Parameters:
        dirty - dirty flag to set
      • flush

        public void flush()
        Description copied from interface: IMappedPage
        Persist any changes to disk
        Specified by:
        flush in interface IMappedPage
      • getLocal

        public byte[] getLocal​(int position,
                               int length)
        Description copied from interface: IMappedPage
        Get data from a thread local copy of the mapped page buffer
        Specified by:
        getLocal in interface IMappedPage
        Parameters:
        position - start position(relative to the start position of source mapped page buffer) of the thread local buffer
        length - the length to fetch
        Returns:
        byte data
      • getLocal

        public ByteBuffer getLocal​(int position)
        Description copied from interface: IMappedPage
        Get a thread local copy of the mapped page buffer
        Specified by:
        getLocal in interface IMappedPage
        Parameters:
        position - start position(relative to the start position of source mapped page buffer) of the thread local buffer
        Returns:
        a byte buffer with specific position as start position.
      • isClosed

        public boolean isClosed()
        Description copied from interface: IMappedPage
        Check if this mapped page has been closed or not
        Specified by:
        isClosed in interface IMappedPage
        Returns:
        returns true if closed
      • getPageFile

        public String getPageFile()
        Description copied from interface: IMappedPage
        The back page file name of the mapped page
        Specified by:
        getPageFile in interface IMappedPage
        Returns:
        name of page file
      • getPageIndex

        public long getPageIndex()
        Description copied from interface: IMappedPage
        The index of the mapped page
        Specified by:
        getPageIndex in interface IMappedPage
        Returns:
        the index