Interface BlockMgr

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Block allocate​(int blockSize)
      Allocate an uninitialized block - writable - call only inside a update sequence.
      long allocLimit()
      The fixed allocated blocks are in the range [0,allocLimit).
      void beginRead()
      Start of read
      void beginUpdate()
      Start of update
      void close()
      Close the block manager
      void endRead()
      Completion of read
      void endUpdate()
      Completion of update
      void free​(Block block)
      Announce a block is no longer in use (i.e it's now freed)
      java.lang.String getLabel()  
      Block getRead​(long id)
      Fetch a block, use for read only
      Block getWrite​(long id)
      Fetch a block, use for write and read - only inside "update"
      boolean isClosed()
      Is this block manager still usable? Closed block managers can not perform any operations except this one.
      boolean isEmpty()
      Answer whether there are any blocks in the collection being managed
      void overwrite​(Block blk)
      Replace the contents of a block slot with new contents.
      Block promote​(Block block)
      Promote to writable : it's OK to promote an already writable block
      void release​(Block block)
      Release a block, unmodified or already written.
      void resetAlloc​(long boundary)
      Reset the allocation limit, should be a number previously obtained from allocLimit
      void sync()
      Sync the block manager
      void syncForce()
      Sync the block manager : system operation to ensure sync() is passed down
      boolean valid​(int id)
      Is this a valid block id? (may be a free block)
      void write​(Block block)
      Write a block back - it still needs releasing.
    • Method Detail

      • allocate

        Block allocate​(int blockSize)
        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
      • allocLimit

        long allocLimit()
        The fixed allocated blocks are in the range [0,allocLimit). Allocation units need not be +1 increments
      • resetAlloc

        void resetAlloc​(long boundary)
        Reset the allocation limit, should be a number previously obtained from allocLimit
      • getRead

        Block getRead​(long id)
        Fetch a block, use for read only
      • getWrite

        Block getWrite​(long id)
        Fetch a block, use for write and read - only inside "update"
      • release

        void release​(Block block)
        Release a block, unmodified or already written.
      • promote

        Block promote​(Block block)
        Promote to writable : it's OK to promote an already writable block
      • write

        void write​(Block block)
        Write a block back - it still needs releasing.
      • overwrite

        void overwrite​(Block blk)
        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

        void free​(Block block)
        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:
        close in interface org.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:
        sync in interface org.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
      • getLabel

        java.lang.String getLabel()