Package org.elasticsearch.nativeaccess
Interface CloseableMappedByteBuffer
- All Superinterfaces:
AutoCloseable,CloseableByteBuffer
- All Known Implementing Classes:
JdkCloseableMappedByteBuffer,PosixCloseableMappedByteBuffer
A closeable buffer backed by a mapped file.
-
Method Summary
Modifier and TypeMethodDescriptionvoidmadvise(long offset, long length, int advice) Advises the operating system about the expected access pattern for the specified memory region, allowing the kernel to optimize paging behavior.voidprefetch(long offset, long length) Prefetches the given offset and length.slice(long index, long length) Returns a slice of this buffer.Methods inherited from interface org.elasticsearch.foreign.CloseableByteBuffer
buffer, close
-
Method Details
-
slice
Returns a slice of this buffer. Closing a slice does not close it's parent. -
prefetch
void prefetch(long offset, long length) Prefetches the given offset and length. -
madvise
void madvise(long offset, long length, int advice) Advises the operating system about the expected access pattern for the specified memory region, allowing the kernel to optimize paging behavior.- Parameters:
offset- the starting offset within the bufferlength- the length of the region in bytesadvice- the access pattern advice; seeMadviseAdviceconstants
-