Class LocalStorageObject
java.lang.Object
org.elasticsearch.xpack.esql.datasource.http.local.LocalStorageObject
- All Implemented Interfaces:
StorageObject
StorageObject implementation for local file system.
Supports:
- Full file reads via FileInputStream
- Range reads via RandomAccessFile for columnar formats
- File metadata (size, last modified)
-
Field Summary
Fields inherited from interface org.elasticsearch.xpack.esql.datasources.spi.StorageObject
TRANSFER_BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionLocalStorageObject(Path filePath) LocalStorageObject(Path filePath, long length) LocalStorageObject(Path filePath, long length, Instant lastModified) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()longlength()newStream(long position, long length) path()intreadBytes(long position, ByteBuffer target) Reads directly into the target ByteBuffer using positionalFileChannelI/O viaChannels.readFromFileChannel(java.nio.channels.FileChannel, long, int).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.datasources.spi.StorageObject
readBytesAsync, readBytesAsync, supportsNativeAsync
-
Constructor Details
-
LocalStorageObject
-
LocalStorageObject
-
LocalStorageObject
-
-
Method Details
-
newStream
- Specified by:
newStreamin interfaceStorageObject- Throws:
IOException
-
newStream
- Specified by:
newStreamin interfaceStorageObject- Throws:
IOException
-
readBytes
Reads directly into the target ByteBuffer using positionalFileChannelI/O viaChannels.readFromFileChannel(java.nio.channels.FileChannel, long, int). Both heap and direct buffers are handled natively by the OS with no intermediate copies.- Specified by:
readBytesin interfaceStorageObject- Throws:
IOException
-
length
- Specified by:
lengthin interfaceStorageObject- Throws:
IOException
-
lastModified
- Specified by:
lastModifiedin interfaceStorageObject- Throws:
IOException
-
exists
- Specified by:
existsin interfaceStorageObject- Throws:
IOException
-
path
- Specified by:
pathin interfaceStorageObject
-