Extract interfaces for Index and IndexCollection
Add another type argument for the key type, e.g. Change.Id. Keep subinterfaces ChangeIndex and ChangeIndexCollection to avoid having to pass around lots of type arguments; Schema<ChangeData> was bad enough, adding one more would be tortuous. Change-Id: Id54b985692ca41ffcaabe9793d8b9035cb1d4e82
This commit is contained in:
@@ -22,8 +22,8 @@ import com.google.common.primitives.Ints;
|
||||
import com.google.gerrit.extensions.events.LifecycleListener;
|
||||
import com.google.gerrit.server.config.GerritServerConfig;
|
||||
import com.google.gerrit.server.config.SitePaths;
|
||||
import com.google.gerrit.server.index.IndexCollection;
|
||||
import com.google.gerrit.server.index.Schema;
|
||||
import com.google.gerrit.server.index.change.ChangeIndexCollection;
|
||||
import com.google.gerrit.server.index.change.ChangeSchemas;
|
||||
import com.google.gerrit.server.query.change.ChangeData;
|
||||
import com.google.inject.Inject;
|
||||
@@ -92,7 +92,7 @@ public class LuceneVersionManager implements LifecycleListener {
|
||||
|
||||
private final SitePaths sitePaths;
|
||||
private final LuceneChangeIndex.Factory indexFactory;
|
||||
private final IndexCollection indexes;
|
||||
private final ChangeIndexCollection indexes;
|
||||
private final OnlineReindexer.Factory reindexerFactory;
|
||||
private final boolean onlineUpgrade;
|
||||
private OnlineReindexer reindexer;
|
||||
@@ -102,7 +102,7 @@ public class LuceneVersionManager implements LifecycleListener {
|
||||
@GerritServerConfig Config cfg,
|
||||
SitePaths sitePaths,
|
||||
LuceneChangeIndex.Factory indexFactory,
|
||||
IndexCollection indexes,
|
||||
ChangeIndexCollection indexes,
|
||||
OnlineReindexer.Factory reindexerFactory) {
|
||||
this.sitePaths = sitePaths;
|
||||
this.indexFactory = indexFactory;
|
||||
|
Reference in New Issue
Block a user