Package org.apache.jena.dboe.base.block
Class BlockMgrCache
- java.lang.Object
-
- org.apache.jena.dboe.base.block.BlockMgrSync
-
- org.apache.jena.dboe.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 Summary
Fields Modifier and Type Field Description static booleanglobalLogging
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the block managervoidfree(Block block)Announce a block is no longer in use (i.e it's now freed)BlockgetRead(long id)Fetch a block, use for read onlyBlockgetWrite(long _id)Fetch a block, use for write and read - only inside "update"voidoverwrite(Block block)Replace the contents of a block slot with new contents.Blockpromote(Block block)Promote to writable : it's OK to promote an already writable blockvoidresetAlloc(long boundary)Reset the allocation limit, should be a number previously obtained from allocLimitvoidsync()Sync the block managervoidsyncForce()Sync the block manager : system operation to ensure sync() is passed downjava.lang.StringtoString()voidwrite(Block block)Write a block back - it still needs releasing.-
Methods inherited from class org.apache.jena.dboe.base.block.BlockMgrSync
allocate, allocLimit, beginRead, beginUpdate, endRead, endUpdate, getLabel, getWrapped, isClosed, isEmpty, release, valid
-
-
-
-
Method Detail
-
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 classBlockMgrSync
-
getRead
public Block getRead(long id)
Description copied from interface:BlockMgrFetch a block, use for read only- Specified by:
getReadin interfaceBlockMgr- Overrides:
getReadin classBlockMgrSync
-
getWrite
public Block getWrite(long _id)
Description copied from interface:BlockMgrFetch a block, use for write and read - only inside "update"- Specified by:
getWritein interfaceBlockMgr- Overrides:
getWritein classBlockMgrSync
-
promote
public Block promote(Block block)
Description copied from interface:BlockMgrPromote to writable : it's OK to promote an already writable block- Specified by:
promotein interfaceBlockMgr- Overrides:
promotein classBlockMgrSync
-
write
public void write(Block block)
Description copied from interface:BlockMgrWrite a block back - it still needs releasing.- Specified by:
writein interfaceBlockMgr- Overrides:
writein classBlockMgrSync
-
overwrite
public void overwrite(Block block)
Description copied from interface:BlockMgrReplace 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:
overwritein interfaceBlockMgr- Overrides:
overwritein classBlockMgrSync
-
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 classBlockMgrSync
-
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 classBlockMgrSync
-
syncForce
public void syncForce()
Description copied from interface:BlockMgrSync the block manager : system operation to ensure sync() is passed down- Specified by:
syncForcein interfaceBlockMgr- Overrides:
syncForcein classBlockMgrSync
-
close
public void close()
Description copied from interface:BlockMgrClose the block manager- Specified by:
closein interfaceBlockMgr- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable- Overrides:
closein classBlockMgrSync
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBlockMgrSync
-
-