Interface StorageProvider
- All Superinterfaces:
AutoCloseable,Closeable
Abstraction for accessing objects in external storage systems.
Implementations handle specific protocols (HTTP, S3, GCS, local, etc.).
This is a read-only interface focused on ESQL's needs for querying external data.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexists(StoragePath path) Checks if an object exists at the given path.listObjects(StoragePath prefix, boolean recursive) Lists objects under a prefix.newObject(StoragePath path) Creates a StorageObject for reading.newObject(StoragePath path, long length) Creates a StorageObject with pre-known length (avoids HEAD request for remote objects).newObject(StoragePath path, long length, Instant lastModified) Creates a StorageObject with pre-known length and modification time.Returns the URI schemes this provider handles (e.g., ["http", "https"]).
-
Method Details
-
newObject
Creates a StorageObject for reading. The path must be a valid object path. -
newObject
Creates a StorageObject with pre-known length (avoids HEAD request for remote objects). -
newObject
Creates a StorageObject with pre-known length and modification time. -
listObjects
Lists objects under a prefix. For blob storage, lists all objects with the given prefix. Returns an iterator to support lazy loading of large directories.- Parameters:
prefix- the prefix path to list underrecursive- if true, recurse into subdirectories; if false, list only immediate children- Throws:
IOException
-
exists
Checks if an object exists at the given path.- Throws:
IOException
-
supportedSchemes
Returns the URI schemes this provider handles (e.g., ["http", "https"]).
-