Class MmappedRegions.Region

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.nio.ByteBuffer buffer  
      long offset  
    • Constructor Summary

      Constructors 
      Constructor Description
      Region​(long offset, java.nio.ByteBuffer buffer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer buffer()
      Returns a useable buffer (i.e.
      long end()  
      long offset()
      Position in the file of the start of the buffer.
      void release()
      To be called when this buffer is no longer in use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • offset

        public final long offset
      • buffer

        public final java.nio.ByteBuffer buffer
    • Constructor Detail

      • Region

        public Region​(long offset,
                      java.nio.ByteBuffer buffer)
    • Method Detail

      • buffer

        public java.nio.ByteBuffer buffer()
        Description copied from interface: Rebufferer.BufferHolder
        Returns a useable buffer (i.e. one whose position and limit can be freely modified). Its limit will be set to the size of the available data in the buffer. The buffer must be treated as read-only.
        Specified by:
        buffer in interface Rebufferer.BufferHolder
      • end

        public long end()
      • release

        public void release()
        Description copied from interface: Rebufferer.BufferHolder
        To be called when this buffer is no longer in use. Must be called for all BufferHolders, or ChunkCache will not be able to free blocks.
        Specified by:
        release in interface Rebufferer.BufferHolder