Package org.elasticsearch.nio
Class Page
java.lang.Object
org.elasticsearch.nio.Page
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theByteBufferfor this page.voidclose()Duplicates this page and increments the reference count.
-
Constructor Details
-
Page
-
-
Method Details
-
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
Returns theByteBufferfor this page. Modifications to the limits, positions, etc of the buffer will also mutate this page. CallByteBuffer.duplicate()to avoid mutating the page.- Returns:
- the byte buffer
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-