886746ff6f
This collects the schema definitions (superseding the static ChangeSchemas utilities) into a class called SchemaDefinitions. Additionally, the backend-specific implementation classes (index collection, site indexer, etc.) are collected into a class called IndexDefinition. (We use the longer "definition" rather than "type" because the latter is already used to describe the backend implementation.) The total set of supported index definitions is bound in IndexModule, which provides them as a Collection<IndexDefinition<?, ?, ?>>. Alternatively, callers that can't get the injected implementations (notably InitIndex) can access the fully-static list of schema definitions. Abstract out LuceneChangeIndex.Factory into a generic IndexFactory interface. At this point the only things that a particular backend implementation needs to implement are: - The IndexFactory that constructs a per-implementation index implementation given a schema definition. Eventually this will expand to one IndexFactory implementation per index definition. - A listener that populates the IndexCollection for each supported index definition. This change uses the Collection<IndexDefinition> in most places where it is possible, with a few exceptions that will require a bit more work: - LuceneVersionManager, which is used directly by some SSH commands to manipulate the index. - Reindex, which needs a different scheme for passing flags. Change-Id: Ia5724cfecaae6335e7c0df24cd41c87b2bb5e36a |
||
---|---|---|
.. | ||
src/test/java/com/google/gerrit/acceptance | ||
BUCK | ||
pom.xml |