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.Closeable
Interface 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:
  • Method Summary

    Modifier and Type
    Method
    Description
    allocate(int size)
     
     
    boolean
     
    void
     
    read(long id)
     
    boolean
    valid(long id)
     
    void
    write(Block block)
     

    Methods inherited from interface org.apache.jena.atlas.lib.Closeable

    close

    Methods inherited from interface org.apache.jena.atlas.lib.Sync

    sync
  • Method Details

    • allocate

      Block allocate(int size)
    • read

      Block read(long id)
    • write

      void write(Block block)
    • overwrite

      void overwrite(Block block)
    • isEmpty

      boolean isEmpty()
    • valid

      boolean valid(long id)
    • getLabel

      String getLabel()