Class PageBase

java.lang.Object
org.aksw.commons.io.block.impl.PageBase
All Implemented Interfaces:
AutoCloseable, Block, Segment, Page, org.aksw.commons.io.util.channel.ChannelFactory<Seekable>

public class PageBase extends Object implements Page
  • Field Details

    • pageManager

      protected PageManager pageManager
    • id

      protected long id
    • originalBuffer

      protected ByteBuffer originalBuffer
  • Constructor Details

  • Method Details

    • getOffset

      public long getOffset()
      Description copied from interface: Block
      Offset in a parent container; should be 0 if there is none
      Specified by:
      getOffset in interface Block
      Specified by:
      getOffset in interface Page
      Returns:
    • getPageManager

      public PageManager getPageManager()
      Specified by:
      getPageManager in interface Page
    • newBuffer

      public ByteBuffer newBuffer()
      Description copied from interface: Page
      Return a byte buffer for the page with freshly initialized positioning i.e. the returned byte buffer should be created using originalBuffer.duplicate()
      Specified by:
      newBuffer in interface Page
      Returns:
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception