Remove unneeded nested MultiVersionModule class
This also align LuceneIndexModule with ElasticIndexModule which will make it easier to refactor them to remove duplication. Change-Id: Iaf0abdf0cfe5d9b0374d6f271da572bcd8832e4b
This commit is contained in:
parent
37d47e9c6e
commit
532ea15eac
@ -74,7 +74,8 @@ public class LuceneIndexModule extends LifecycleModule {
|
|||||||
|
|
||||||
install(new IndexModule(threads));
|
install(new IndexModule(threads));
|
||||||
if (singleVersions == null) {
|
if (singleVersions == null) {
|
||||||
install(new MultiVersionModule());
|
bind(AbstractVersionManager.class).to(LuceneVersionManager.class);
|
||||||
|
listener().to(LuceneVersionManager.class);
|
||||||
} else {
|
} else {
|
||||||
install(new SingleVersionModule(singleVersions));
|
install(new SingleVersionModule(singleVersions));
|
||||||
}
|
}
|
||||||
@ -87,12 +88,4 @@ public class LuceneIndexModule extends LifecycleModule {
|
|||||||
cfg.getInt("index", "maxTerms", BooleanQuery.getMaxClauseCount()));
|
cfg.getInt("index", "maxTerms", BooleanQuery.getMaxClauseCount()));
|
||||||
return IndexConfig.fromConfig(cfg);
|
return IndexConfig.fromConfig(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class MultiVersionModule extends LifecycleModule {
|
|
||||||
@Override
|
|
||||||
public void configure() {
|
|
||||||
bind(AbstractVersionManager.class).to(LuceneVersionManager.class);
|
|
||||||
listener().to(LuceneVersionManager.class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user