Interface FileList
public interface FileList
Indexed view over a resolved set of files from an external data source.
Implementations are package-private within the
datasources.glob package;
consumers should depend only on this interface.
Two sentinel instances encode distinct states:
UNRESOLVED— glob not yet expanded (isResolved() == false, isEmpty() == false)EMPTY— glob expanded but matched zero files (isResolved() == true, isEmpty() == true)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongintdefault FileSetFingerprintThe 128-bit fingerprint identifying the resolved file SET: a commutative fold over every file's(path, mtime, size)plus the file count, computed once when the listing is built.booleanisEmpty()booleanlonglastModifiedMillis(int i) path(int i) longsize(int i)
-
Field Details
-
UNRESOLVED
Sentinel: single-file path, glob not yet applied (isResolved() == false). -
EMPTY
Sentinel: glob expanded but matched zero files (isResolved() == true, isEmpty() == true).
-
-
Method Details
-
fileCount
int fileCount() -
path
-
size
long size(int i) -
lastModifiedMillis
long lastModifiedMillis(int i) -
originalPattern
-
partitionMetadata
-
isResolved
boolean isResolved() -
isEmpty
boolean isEmpty() -
estimatedBytes
long estimatedBytes() -
fileSetFingerprint
The 128-bit fingerprint identifying the resolved file SET: a commutative fold over every file's(path, mtime, size)plus the file count, computed once when the listing is built. The same set listed in any order yields the same fingerprint; any file added, removed, or modified (mtime or size) yields a different one. This makes the fingerprint a content-addressed cache key for dataset-level derived state (e.g. the warm COUNT(*) aggregate): keys derived from it are correct-or-miss by construction, with no separate invalidation protocol — and they survive listing refreshes (the 30s listing TTL) as long as the underlying files are unchanged, because the fingerprint derives from listing CONTENT, not listing object identity.nullfor the sentinels and for implementations that do not compute one.
-