Class PageBlockMgr<T extends Page>

  • All Implemented Interfaces:
    org.apache.jena.atlas.lib.Closeable
    Direct Known Subclasses:
    RecordBufferPageMgr

    public class PageBlockMgr<T extends Page>
    extends java.lang.Object
    implements org.apache.jena.atlas.lib.Closeable
    Engine that wraps from blocks to typed pages.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long allocLimit()  
      void close()  
      T create​(BlockType bType)
      Allocate a new thing
      void dump()  
      void finishRead()
      Signal the completion of an read operation
      void finishUpdate()
      Signal the completion of an update operation
      void free​(Page page)  
      BlockMgr getBlockMgr()  
      T getRead​(int id)
      Fetch a block for reading.
      T getRead​(int id, int referencingId)
      Fetch a block for reading.
      T getWrite​(int id)
      Fetch a block for writing.
      T getWrite​(int id, int referencingId)
      Fetch a block for writing.
      boolean promoteDuplicate​(Page page)
      Promote a page - return 'true' if the block changed (.reset()) will have been called
      void promoteInPlace​(Page page)
      Promote a page to be writable in-place (block id does not change, hence page does not change id).
      void put​(T page)  
      void release​(Page page)  
      void resetAlloc​(long boundary)  
      void startRead()
      Signal the start of an read operation
      void startUpdate()
      Signal the start of an update operation
      boolean valid​(int id)  
      void write​(T page)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBlockMgr

        public BlockMgr getBlockMgr()
      • allocLimit

        public long allocLimit()
      • resetAlloc

        public void resetAlloc​(long boundary)
      • create

        public T create​(BlockType bType)
        Allocate a new thing
      • getRead

        public T getRead​(int id)
        Fetch a block for reading.
        Parameters:
        id - Block to fetch
      • getRead

        public T getRead​(int id,
                         int referencingId)
        Fetch a block for reading.
        Parameters:
        id - Block to fetch
        referencingId - Id of block referring to this one. For example, a parent in a tree. May be negative for "none" or "meaningless".
      • getWrite

        public T getWrite​(int id)
        Fetch a block for writing.
        Parameters:
        id - Block to fetch
      • getWrite

        public T getWrite​(int id,
                          int referencingId)
        Fetch a block for writing.
        Parameters:
        id - Block to fetch
        referencingId - Id of block referring to this one. For example, a parent in a tree. May be -1 for "none" or "meaningless".
      • put

        public void put​(T page)
      • write

        public void write​(T page)
      • release

        public void release​(Page page)
      • free

        public void free​(Page page)
      • promoteInPlace

        public void promoteInPlace​(Page page)
        Promote a page to be writable in-place (block id does not change, hence page does not change id).
      • promoteDuplicate

        public boolean promoteDuplicate​(Page page)
        Promote a page - return 'true' if the block changed (.reset()) will have been called
      • valid

        public boolean valid​(int id)
      • dump

        public void dump()
      • startUpdate

        public void startUpdate()
        Signal the start of an update operation
      • finishUpdate

        public void finishUpdate()
        Signal the completion of an update operation
      • startRead

        public void startRead()
        Signal the start of an read operation
      • finishRead

        public void finishRead()
        Signal the completion of an read operation
      • close

        public void close()
        Specified by:
        close in interface org.apache.jena.atlas.lib.Closeable