Package org.apache.jena.dboe.base.file
Interface BlockAccess
-
- All Superinterfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync
- All Known Implementing Classes:
BlockAccessBase,BlockAccessByteArray,BlockAccessDirect,BlockAccessMapped,BlockAccessMem
public interface BlockAccess extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.CloseableInterface to concrete storage - read and write Blocks, addressed by id. Suitable for memory mapped I/O (returns internally allocated space for read, not provided from outside; write() can insist the block written comes from allocate()). This interface can also be backed by an in-memory implementation (BlockAccessMem,BlockAccessByteArray). This is wrapped in a BlockMgr to provide a higher level abstraction.- See Also:
BufferChannel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Blockallocate(int size)longallocBoundary()java.lang.StringgetLabel()booleanisEmpty()voidoverwrite(Block block)Blockread(long id)voidresetAllocBoundary(long boundary)Reset the allocation space (i.e.booleanvalid(long id)voidwrite(Block block)
-
-
-
Method Detail
-
allocate
Block allocate(int size)
-
read
Block read(long id)
-
write
void write(Block block)
-
overwrite
void overwrite(Block block)
-
isEmpty
boolean isEmpty()
-
allocBoundary
long allocBoundary()
-
resetAllocBoundary
void resetAllocBoundary(long boundary)
Reset the allocation space (i.e. truncate). The boundary should be a number obtained from a previous call of allocLimit. It can not be greater than the current allocation boundary.
-
valid
boolean valid(long id)
-
getLabel
java.lang.String getLabel()
-
-