Package org.apache.jena.dboe.base.block
Class BlockMgrFreeChain
- java.lang.Object
-
- org.apache.jena.dboe.base.block.BlockMgrWrapper
-
- org.apache.jena.dboe.base.block.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 Summary
Constructors Constructor Description BlockMgrFreeChain(BlockMgr blockMgr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Blockallocate(int blockSize)Allocate an uninitialized block - writable - call only inside a update sequence.voidfree(Block block)Announce a block is no longer in use (i.e it's now freed)voidresetAlloc(long boundary)Reset the allocation limit, should be a number previously obtained from allocLimitvoidsync()Sync the block managerjava.lang.StringtoString()booleanvalid(int id)Is this a valid block id? (may be a free block)-
Methods inherited from class org.apache.jena.dboe.base.block.BlockMgrWrapper
allocLimit, beginRead, beginUpdate, close, endRead, endUpdate, getLabel, getRead, getWrapped, getWrite, isClosed, isEmpty, overwrite, promote, release, syncForce, write
-
-
-
-
Constructor Detail
-
BlockMgrFreeChain
public BlockMgrFreeChain(BlockMgr blockMgr)
-
-
Method Detail
-
allocate
public Block allocate(int blockSize)
Description copied from interface:BlockMgrAllocate an uninitialized block - writable - call only inside a update sequence. If blockSize is -1, means "default/fixed size" for this BlockMgr- Specified by:
allocatein interfaceBlockMgr- Overrides:
allocatein classBlockMgrWrapper
-
free
public void free(Block block)
Description copied from interface:BlockMgrAnnounce a block is no longer in use (i.e it's now freed)- Specified by:
freein interfaceBlockMgr- Overrides:
freein classBlockMgrWrapper
-
resetAlloc
public void resetAlloc(long boundary)
Description copied from interface:BlockMgrReset the allocation limit, should be a number previously obtained from allocLimit- Specified by:
resetAllocin interfaceBlockMgr- Overrides:
resetAllocin classBlockMgrWrapper
-
valid
public boolean valid(int id)
Description copied from interface:BlockMgrIs this a valid block id? (may be a free block)- Specified by:
validin interfaceBlockMgr- Overrides:
validin classBlockMgrWrapper
-
sync
public void sync()
Description copied from interface:BlockMgrSync the block manager- Specified by:
syncin interfaceBlockMgr- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync- Overrides:
syncin classBlockMgrWrapper
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBlockMgrWrapper
-
-