Class FileBloomEntry

java.lang.Object
org.eclipse.lemminx.extensions.index.FileBloomEntry

public final class FileBloomEntry extends Object
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 BloomFilter containing all token names found in the file ("schema.xsd", element names, type names, …). Used to answer "does order.xml possibly reference schema.xsd?" in O(1) during rename candidate lookup.
  • A GrammarReference list with the confirmed grammar references: e.g. [XML_MODEL_HREF@17 "schema.xsd"]. Used to count references for the "N references" code lens on schema.xsd without re-reading order.xml — and to skip Bloom false positives during "Find References".
  • A cached Path derived from fileUri() at construction time, so that query methods in WorkspaceIndex never call FilesUtils.getPathOrNull per 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: