gerrit/gerrit-acceptance-framework
Dave Borowitz 886746ff6f Encapsulate per-index utilities in a pair of generic classes
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
2016-03-18 09:39:32 +01:00
..
src/test/java/com/google/gerrit/acceptance Encapsulate per-index utilities in a pair of generic classes 2016-03-18 09:39:32 +01:00
BUCK Merge "Buck: Emulate real JGit project structure in its own cell" 2016-02-18 15:27:09 +00:00
pom.xml Add new maintainers to "developers" section in pom.xml files 2016-03-15 13:35:49 +09:00