Class DirectAccessIndexInput

java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.apache.lucene.store.FilterIndexInput
org.elasticsearch.common.lucene.store.DirectAccessIndexInput
All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable, DirectAccessInput

public class DirectAccessIndexInput extends org.apache.lucene.store.FilterIndexInput implements DirectAccessInput
A test utility that wraps an IndexInput and implements DirectAccessInput, serving direct MemorySegment slices backed by CloseableByteBuffer for deterministic native memory management. The buffers are allocated via NativeAccess and freed eagerly when the action completes.
  • Field Summary

    Fields inherited from class org.apache.lucene.store.FilterIndexInput

    in
  • Constructor Summary

    Constructors
    Constructor
    Description
    DirectAccessIndexInput(String resourceDescription, org.apache.lucene.store.IndexInput delegate, byte[] data)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.store.IndexInput
     
    org.apache.lucene.store.IndexInput
    slice(String sliceDescription, long offset, long length)
     
    boolean
    withMemorySegmentSlice(long offset, long length, CheckedConsumer<MemorySegment,IOException> action)
     
    boolean
    withMemorySegmentSlices(long[] offsets, int length, int count, CheckedConsumer<MemorySegment[],IOException> action)
     

    Methods inherited from class org.apache.lucene.store.FilterIndexInput

    close, getDelegate, getFilePointer, length, readByte, readBytes, seek, unwrap, unwrapOnlyTest

    Methods inherited from class org.apache.lucene.store.IndexInput

    getFullSliceDescription, isLoaded, prefetch, randomAccessSlice, skipBytes, slice, toString, updateIOContext

    Methods inherited from class org.apache.lucene.store.DataInput

    readBytes, readFloats, readGroupVInt, readInt, readInts, readLong, readLongs, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait