Interface CloseableMappedByteBuffer

All Superinterfaces:
AutoCloseable, CloseableByteBuffer
All Known Implementing Classes:
JdkCloseableMappedByteBuffer, PosixCloseableMappedByteBuffer

public interface CloseableMappedByteBuffer extends CloseableByteBuffer
A closeable buffer backed by a mapped file.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    void
    prefetch(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

      CloseableMappedByteBuffer slice(long index, long length)
      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 buffer
      length - the length of the region in bytes
      advice - the access pattern advice; see MadviseAdvice constants