Class BlockMgrCache

java.lang.Object
org.apache.jena.tdb1.base.block.BlockMgrSync
org.apache.jena.tdb1.base.block.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 Details

    • globalLogging

      public static boolean globalLogging
  • Method Details

    • getRead

      public Block getRead(long id)
      Description copied from interface: BlockMgr
      Fetch a block, use for read only
      Specified by:
      getRead in interface BlockMgr
      Overrides:
      getRead in class BlockMgrSync
    • getReadIterator

      public Block getReadIterator(long id)
      Description copied from interface: BlockMgr
      Fetch a block, use for read only in an iterator
      Specified by:
      getReadIterator in interface BlockMgr
      Overrides:
      getReadIterator 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
    • promote

      public Block promote(Block block)
      Description copied from interface: BlockMgr
      Promote to writeable : it's OK to promote an already writeable block
      Specified by:
      promote in interface BlockMgr
      Overrides:
      promote 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
    • toString

      public String toString()
      Overrides:
      toString in class BlockMgrSync