Class BlockMgrCache

  • All Implemented Interfaces:
    org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync, BlockMgr

    public class BlockMgrCache
    extends BlockMgrSync
    Caching block manager - this is an LRU cache
    • Field Detail

      • globalLogging

        public static boolean globalLogging
    • Method Detail

      • resetAlloc

        public void resetAlloc​(long boundary)
        Description copied from interface: BlockMgr
        Reset the allocation limit, should be a number previously obtained from allocLimit
        Specified by:
        resetAlloc in interface BlockMgr
        Overrides:
        resetAlloc in class BlockMgrSync
      • getWrite

        public Block getWrite​(long _id)
        Description copied from interface: BlockMgr
        Fetch a block, use for write and read - only inside "update"
        Specified by:
        getWrite in interface BlockMgr
        Overrides:
        getWrite in class BlockMgrSync
      • write

        public void write​(Block block)
        Description copied from interface: BlockMgr
        Write a block back - it still needs releasing.
        Specified by:
        write in interface BlockMgr
        Overrides:
        write in class BlockMgrSync
      • overwrite

        public void overwrite​(Block block)
        Description copied from interface: BlockMgr
        Replace the contents of a block slot with new contents. Block does not need releasing. The write() operation may not do real work if the block is mapped - this operation really does replace the contents with the new contents.
        Specified by:
        overwrite in interface BlockMgr
        Overrides:
        overwrite in class BlockMgrSync
      • free

        public void free​(Block block)
        Description copied from interface: BlockMgr
        Announce a block is no longer in use (i.e it's now freed)
        Specified by:
        free in interface BlockMgr
        Overrides:
        free in class BlockMgrSync
      • sync

        public void sync()
        Description copied from interface: BlockMgr
        Sync the block manager
        Specified by:
        sync in interface BlockMgr
        Specified by:
        sync in interface org.apache.jena.atlas.lib.Sync
        Overrides:
        sync in class BlockMgrSync
      • syncForce

        public void syncForce()
        Description copied from interface: BlockMgr
        Sync the block manager : system operation to ensure sync() is passed down
        Specified by:
        syncForce in interface BlockMgr
        Overrides:
        syncForce in class BlockMgrSync
      • close

        public void close()
        Description copied from interface: BlockMgr
        Close the block manager
        Specified by:
        close in interface BlockMgr
        Specified by:
        close in interface org.apache.jena.atlas.lib.Closeable
        Overrides:
        close in class BlockMgrSync