Class BlockMgrFreeChain

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

    public final class BlockMgrFreeChain
    extends BlockMgrWrapper
    Recycle blocks - but only in-session. At the end of JVM run, the blocks are made "permanent" as no one finds them again on restart.
    • Constructor Detail

      • BlockMgrFreeChain

        public BlockMgrFreeChain​(BlockMgr blockMgr)
    • Method Detail

      • allocate

        public Block allocate​(int blockSize)
        Description copied from interface: BlockMgr
        Allocate an uninitialized block - writable - call only inside a update sequence. If blockSize is -1, means "default/fixed size" for this BlockMgr
        Specified by:
        allocate in interface BlockMgr
        Overrides:
        allocate in class BlockMgrWrapper
      • 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 BlockMgrWrapper
      • 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 BlockMgrWrapper
      • valid

        public boolean valid​(int id)
        Description copied from interface: BlockMgr
        Is this a valid block id? (may be a free block)
        Specified by:
        valid in interface BlockMgr
        Overrides:
        valid in class BlockMgrWrapper
      • 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 BlockMgrWrapper