Search in sources :

Example 1 with SingleVersionModule

use of com.google.gerrit.server.index.SingleVersionModule in project gerrit by GerritCodeReview.

the class ElasticIndexModule method configure.

@Override
protected void configure() {
    install(new FactoryModuleBuilder().implement(AccountIndex.class, ElasticAccountIndex.class).build(AccountIndex.Factory.class));
    install(new FactoryModuleBuilder().implement(ChangeIndex.class, ElasticChangeIndex.class).build(ChangeIndex.Factory.class));
    install(new FactoryModuleBuilder().implement(GroupIndex.class, ElasticGroupIndex.class).build(GroupIndex.Factory.class));
    install(new IndexModule(threads));
    if (singleVersions == null) {
        listener().to(ElasticVersionManager.class);
    } else {
        install(new SingleVersionModule(singleVersions));
    }
}
Also used : FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) SingleVersionModule(com.google.gerrit.server.index.SingleVersionModule) IndexModule(com.google.gerrit.server.index.IndexModule)

Example 2 with SingleVersionModule

use of com.google.gerrit.server.index.SingleVersionModule in project gerrit by GerritCodeReview.

the class LuceneIndexModule method configure.

@Override
protected void configure() {
    install(new FactoryModuleBuilder().implement(AccountIndex.class, LuceneAccountIndex.class).build(AccountIndex.Factory.class));
    install(new FactoryModuleBuilder().implement(ChangeIndex.class, LuceneChangeIndex.class).build(ChangeIndex.Factory.class));
    install(new FactoryModuleBuilder().implement(GroupIndex.class, LuceneGroupIndex.class).build(GroupIndex.Factory.class));
    install(new IndexModule(threads));
    if (singleVersions == null) {
        install(new MultiVersionModule());
    } else {
        install(new SingleVersionModule(singleVersions));
    }
}
Also used : FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) SingleVersionModule(com.google.gerrit.server.index.SingleVersionModule) IndexModule(com.google.gerrit.server.index.IndexModule)

Aggregations

IndexModule (com.google.gerrit.server.index.IndexModule)2 SingleVersionModule (com.google.gerrit.server.index.SingleVersionModule)2 FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)2