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
Caching block manager - this is an LRU cache
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the block managervoidAnnounce a block is no longer in use (i.e it's now freed)getRead(long id) Fetch a block, use for read onlygetWrite(long _id) Fetch a block, use for write and read - only inside "update"voidReplace the contents of a block slot with new contents.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 managervoidSync the block manager : system operation to ensure sync() is passed downtoString()voidWrite 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
-
Field Details
-
globalLogging
public static boolean globalLogging
-
-
Method Details
-
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
Description copied from interface:BlockMgrFetch a block, use for read only- Specified by:
getReadin interfaceBlockMgr- Overrides:
getReadin classBlockMgrSync
-
getWrite
Description copied from interface:BlockMgrFetch a block, use for write and read - only inside "update"- Specified by:
getWritein interfaceBlockMgr- Overrides:
getWritein classBlockMgrSync
-
promote
Description copied from interface:BlockMgrPromote to writable : it's OK to promote an already writable block- Specified by:
promotein interfaceBlockMgr- Overrides:
promotein classBlockMgrSync
-
write
Description copied from interface:BlockMgrWrite a block back - it still needs releasing.- Specified by:
writein interfaceBlockMgr- Overrides:
writein classBlockMgrSync
-
overwrite
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
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
- Overrides:
toStringin classBlockMgrSync
-