- All Superinterfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync
- All Known Implementing Classes:
BlockMgrBase,BlockMgrCache,BlockMgrFileAccess,BlockMgrFreeChain,BlockMgrJournal,BlockMgrLogger,BlockMgrReadonly,BlockMgrSwitcher,BlockMgrSync,BlockMgrTracker,BlockMgrWrapper
public interface BlockMgr
extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
-
Method Summary
Modifier and TypeMethodDescriptionallocate(int blockSize) Allocate an uninitialized block - writable - call only inside a update sequence.voidbeginIterator(Iterator<?> iterator) Start of iteratorvoidStart of readvoidStart of updatevoidclose()Close the block managervoidendIterator(Iterator<?> iterator) Completion of iteratorvoidendRead()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 onlygetReadIterator(long id) Fetch a block, use for read only in an iteratorgetWrite(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 writeable : it's OK to promote an already writeable blockvoidRelease a block, unmodified.voidsync()Sync the block managervoidSync the block manager : system operation to ensure sync() is passed downbooleanvalid(int id) Is this a valid block id? (may be a free block)voidWrite a block back - it still needs releasing.
-
Method Details
-
allocate
Allocate an uninitialized block - writable - call only inside a update sequence. If blockSize is -1, means "default/fixed size" for this BlockMgr -
isEmpty
boolean isEmpty()Answer whether there are any blocks in the collection being managed -
getRead
Fetch a block, use for read only -
getReadIterator
Fetch a block, use for read only in an iterator -
getWrite
Fetch a block, use for write and read - only inside "update" -
release
Release a block, unmodified. -
promote
Promote to writeable : it's OK to promote an already writeable block -
write
Write a block back - it still needs releasing. -
overwrite
Replace 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
Announce a block is no longer in use (i.e it's now freed) -
valid
boolean valid(int id) Is this a valid block id? (may be a free block) -
close
void close()Close the block manager- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
isClosed
boolean isClosed()Is this block manager still usable? Closed block managers can not perform any operations except this one. -
sync
void sync()Sync the block manager- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync
-
syncForce
void syncForce()Sync the block manager : system operation to ensure sync() is passed down -
beginUpdate
void beginUpdate()Start of update -
endUpdate
void endUpdate()Completion of update -
beginRead
void beginRead()Start of read -
endRead
void endRead()Completion of read -
beginIterator
Start of iterator -
endIterator
Completion of iterator -
getLabel
String getLabel()
-