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:
    BufferChannel
    • 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()