Class Page

java.lang.Object
org.elasticsearch.nio.Page
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.core.Releasable

public class Page extends Object implements org.elasticsearch.core.Releasable
  • Constructor Details

    • Page

      public Page(ByteBuffer byteBuffer, org.elasticsearch.core.Releasable closeable)
  • Method Details

    • duplicate

      public Page duplicate()
      Duplicates this page and increments the reference count. The new page must be closed independently of the original page.
      Returns:
      the new page
    • byteBuffer

      public ByteBuffer byteBuffer()
      Returns the ByteBuffer for this page. Modifications to the limits, positions, etc of the buffer will also mutate this page. Call ByteBuffer.duplicate() to avoid mutating the page.
      Returns:
      the byte buffer
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.core.Releasable