Search in sources :

Example 1 with BackendMultiImplementationModule

use of com.torodb.packaging.guice.BackendMultiImplementationModule in project torodb by torodb.

the class BootstrapModule method configure.

@Override
protected void configure() {
    binder().requireExplicitBindings();
    install(new PackagingModule(clock));
    install(new CoreModule());
    install(new ExecutorServicesModule());
    install(new ConcurrentModule());
    install(new MetainfModule());
    install(new MetricsModule(config.getGeneric()));
    install(new BackendMultiImplementationModule(config.getProtocol().getMongo(), config.getGeneric(), config.getBackend().getBackendImplementation(), new BackendPostgresImplementationModule(), new BackendDerbyImplementationModule()));
    bind(Config.class).toInstance(config);
    bind(MongodServerConfig.class).toInstance(new MongodServerConfig(HostAndPort.fromParts("localhost", 27017)));
    bind(BuildProperties.class).to(DefaultBuildProperties.class).asEagerSingleton();
}
Also used : PackagingModule(com.torodb.packaging.guice.PackagingModule) ExecutorServicesModule(com.torodb.packaging.guice.ExecutorServicesModule) Config(com.torodb.standalone.config.model.Config) MongodServerConfig(com.torodb.mongodb.core.MongodServerConfig) BackendMultiImplementationModule(com.torodb.packaging.guice.BackendMultiImplementationModule) MetricsModule(com.torodb.core.metrics.guice.MetricsModule) BackendDerbyImplementationModule(com.torodb.packaging.guice.BackendDerbyImplementationModule) ConcurrentModule(com.torodb.concurrent.guice.ConcurrentModule) DefaultBuildProperties(com.torodb.packaging.DefaultBuildProperties) CoreModule(com.torodb.core.guice.CoreModule) MetainfModule(com.torodb.metainfo.guice.MetainfModule) BackendPostgresImplementationModule(com.torodb.packaging.guice.BackendPostgresImplementationModule) MongodServerConfig(com.torodb.mongodb.core.MongodServerConfig)

Aggregations

ConcurrentModule (com.torodb.concurrent.guice.ConcurrentModule)1 CoreModule (com.torodb.core.guice.CoreModule)1 MetricsModule (com.torodb.core.metrics.guice.MetricsModule)1 MetainfModule (com.torodb.metainfo.guice.MetainfModule)1 MongodServerConfig (com.torodb.mongodb.core.MongodServerConfig)1 DefaultBuildProperties (com.torodb.packaging.DefaultBuildProperties)1 BackendDerbyImplementationModule (com.torodb.packaging.guice.BackendDerbyImplementationModule)1 BackendMultiImplementationModule (com.torodb.packaging.guice.BackendMultiImplementationModule)1 BackendPostgresImplementationModule (com.torodb.packaging.guice.BackendPostgresImplementationModule)1 ExecutorServicesModule (com.torodb.packaging.guice.ExecutorServicesModule)1 PackagingModule (com.torodb.packaging.guice.PackagingModule)1 Config (com.torodb.standalone.config.model.Config)1