Package org.apache.jena.dboe.base.file
Class BlockAccessByteArray
- java.lang.Object
-
- org.apache.jena.dboe.base.file.BlockAccessByteArray
-
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,BlockAccess
public class BlockAccessByteArray extends java.lang.Object implements BlockAccess
FileAccess interface backed by a byte array.
-
-
Constructor Summary
Constructors Constructor Description BlockAccessByteArray(java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Blockallocate(int size)longallocBoundary()voidclose()java.lang.StringgetLabel()booleanisEmpty()voidoverwrite(Block block)Blockread(long id)voidresetAllocBoundary(long boundary)Reset the allocation space (i.e.voidsync()booleanvalid(long id)voidwrite(Block block)
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
- Specified by:
getLabelin interfaceBlockAccess
-
allocate
public Block allocate(int size)
- Specified by:
allocatein interfaceBlockAccess
-
allocBoundary
public long allocBoundary()
- Specified by:
allocBoundaryin interfaceBlockAccess
-
resetAllocBoundary
public void resetAllocBoundary(long boundary)
Description copied from interface:BlockAccessReset 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.- Specified by:
resetAllocBoundaryin interfaceBlockAccess
-
read
public Block read(long id)
- Specified by:
readin interfaceBlockAccess
-
write
public void write(Block block)
- Specified by:
writein interfaceBlockAccess
-
overwrite
public void overwrite(Block block)
- Specified by:
overwritein interfaceBlockAccess
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceBlockAccess
-
valid
public boolean valid(long id)
- Specified by:
validin interfaceBlockAccess
-
sync
public void sync()
- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync
-
close
public void close()
- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
-