Class FileBloomEntry
java.lang.Object
org.eclipse.lemminx.extensions.index.FileBloomEntry
Pairs a file's probabilistic
BloomFilter with its confirmed
GrammarReference list, enabling both fast pre-filtering and
zero-I/O reference counting from a single indexing read.
Use case: When order.xml is indexed, its entry stores:
- A
BloomFiltercontaining all token names found in the file ("schema.xsd", element names, type names, …). Used to answer "doesorder.xmlpossibly referenceschema.xsd?" in O(1) during rename candidate lookup. - A
GrammarReferencelist with the confirmed grammar references: e.g.[XML_MODEL_HREF@17 "schema.xsd"]. Used to count references for the "N references" code lens onschema.xsdwithout re-readingorder.xml— and to skip Bloom false positives during "Find References". - A cached
Pathderived fromfileUri()at construction time, so that query methods inWorkspaceIndexnever callFilesUtils.getPathOrNullper entry per query.
All three structures are populated once at indexing time and replaced atomically
whenever the file changes (WorkspaceIndex.indexFile(java.nio.file.Path)). No separate cache
invalidation is needed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFileBloomEntry(String fileUri, BloomFilter filter, List<GrammarReference> refs) -
Method Summary
-
Constructor Details
-
FileBloomEntry
-
-
Method Details
-
fileUri
-
path
-
filter
-
refs
Confirmed grammar references found during indexing. Nevernull.
-