Class PosixMappedSegment
java.lang.Object
org.elasticsearch.nativeaccess.jdk.JdkMappedSegment
org.elasticsearch.nativeaccess.jdk.PosixMappedSegment
- All Implemented Interfaces:
AutoCloseable,MappedSegment
-
Field Summary
Fields inherited from class org.elasticsearch.nativeaccess.jdk.JdkMappedSegment
segment -
Constructor Summary
Constructors -
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.static PosixMappedSegmentofShared(FileChannel fileChannel, FileChannel.MapMode mode, long position, long size) voidprefetch(long offset, long length) Prefetches the given offset and length.slice(long index, long length) Returns a slice of this segment.Methods inherited from class org.elasticsearch.nativeaccess.jdk.JdkMappedSegment
close, segment
-
Constructor Details
-
PosixMappedSegment
-
-
Method Details
-
slice
Description copied from interface:MappedSegmentReturns a slice of this segment. Closing a slice does not close its parent.- Specified by:
slicein interfaceMappedSegment- Overrides:
slicein classJdkMappedSegment
-
prefetch
public void prefetch(long offset, long length) Description copied from interface:MappedSegmentPrefetches the given offset and length.- Specified by:
prefetchin interfaceMappedSegment- Overrides:
prefetchin classJdkMappedSegment
-
madvise
public void madvise(long offset, long length, int advice) Description copied from interface:MappedSegmentAdvises the operating system about the expected access pattern for the specified memory region, allowing the kernel to optimize paging behavior.- Specified by:
madvisein interfaceMappedSegment- Overrides:
madvisein classJdkMappedSegment- Parameters:
offset- the starting offset within the bufferlength- the length of the region in bytesadvice- the access pattern advice; seeMadviseAdviceconstants