Package org.apache.jena.dboe.base.block
Class BlockMgrTracker
java.lang.Object
org.apache.jena.dboe.base.block.BlockMgrTracker
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,BlockMgr
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionallocate(int blockSize) Allocate an uninitialized block - writable - call only inside a update sequence.longThe fixed allocated blocks are in the range [0,allocLimit).voidStart of readvoidStart of updatevoidclose()Close the block managervoidendRead()Completion of readvoidCompletion of updatevoidAnnounce a block is no longer in use (i.e it's now freed)getLabel()getRead(long id) Fetch a block, use for read onlygetWrite(long id) Fetch a block, use for write and read - only inside "update"booleanisClosed()Is this block manager still usable? Closed block managers can not perform any operations except this one.booleanisEmpty()Answer whether there are any blocks in the collection being managedvoidReplace the contents of a block slot with new contents.Promote to writable : it's OK to promote an already writable blockvoidRelease a block, unmodified or already written.voidresetAlloc(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()static BlockMgrbooleanvalid(int id) Is this a valid block id? (may be a free block)voidWrite a block back - it still needs releasing.
-
Field Details
-
verbose
public static boolean verbose
-
-
Method Details
-
track
-
allocate
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 -
getRead
Description copied from interface:BlockMgrFetch a block, use for read only -
getWrite
Description copied from interface:BlockMgrFetch a block, use for write and read - only inside "update" -
promote
Description copied from interface:BlockMgrPromote to writable : it's OK to promote an already writable block -
release
Description copied from interface:BlockMgrRelease a block, unmodified or already written. -
write
Description copied from interface:BlockMgrWrite a block back - it still needs releasing. -
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. -
free
Description copied from interface:BlockMgrAnnounce a block is no longer in use (i.e it's now freed) -
sync
public void sync()Description copied from interface:BlockMgrSync the block manager -
syncForce
public void syncForce()Description copied from interface:BlockMgrSync the block manager : system operation to ensure sync() is passed down -
close
public void close()Description copied from interface:BlockMgrClose the block manager -
isEmpty
public boolean isEmpty()Description copied from interface:BlockMgrAnswer whether there are any blocks in the collection being managed -
allocLimit
public long allocLimit()Description copied from interface:BlockMgrThe fixed allocated blocks are in the range [0,allocLimit). Allocation units need not be +1 increments- Specified by:
allocLimitin interfaceBlockMgr
-
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
-
valid
public boolean valid(int id) Description copied from interface:BlockMgrIs this a valid block id? (may be a free block) -
isClosed
public boolean isClosed()Description copied from interface:BlockMgrIs this block manager still usable? Closed block managers can not perform any operations except this one. -
beginRead
public void beginRead()Description copied from interface:BlockMgrStart of read -
endRead
public void endRead()Description copied from interface:BlockMgrCompletion of read -
beginUpdate
public void beginUpdate()Description copied from interface:BlockMgrStart of update- Specified by:
beginUpdatein interfaceBlockMgr
-
endUpdate
public void endUpdate()Description copied from interface:BlockMgrCompletion of update -
toString
-
getLabel
-