Class GcsStorageObject

java.lang.Object
org.elasticsearch.xpack.esql.datasource.gcs.GcsStorageObject
All Implemented Interfaces:
StorageObject

public final class GcsStorageObject extends Object implements StorageObject
StorageObject implementation for Google Cloud Storage. Supports full and range reads, metadata retrieval with caching, and efficient positional byte reads via ReadableByteChannel.read(ByteBuffer).

In addition to the required stream-based API, this class overrides:

  • readBytes(long, ByteBuffer) — uses ReadChannel.read(ByteBuffer) for direct buffer reads without intermediate byte[] allocation.
  • readBytesAsync(long, long, Executor, ActionListener) — executor-wrapped ReadChannel reads for the async API.
  • supportsNativeAsync() — returns true because this class provides custom async and byte-read implementations that are more efficient than the default InputStream wrappers. Note: the async path is executor-based (blocking a worker thread), not truly non-blocking like HttpClient.sendAsync() or S3AsyncClient.