Search in sources :

Example 1 with PackagingModule

use of com.torodb.packaging.guice.PackagingModule 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)

Example 2 with PackagingModule

use of com.torodb.packaging.guice.PackagingModule 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));
    install(getBackendMultiImplementationModule(config.getReplication(), config.getBackend().getPool(), config.getBackend().getBackendImplementation()));
    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) ConnectionPoolConfig(com.torodb.packaging.config.model.backend.ConnectionPoolConfig) Config(com.torodb.stampede.config.model.Config) MongodServerConfig(com.torodb.mongodb.core.MongodServerConfig) CursorConfig(com.torodb.packaging.config.model.backend.CursorConfig) MetricsModule(com.torodb.core.metrics.guice.MetricsModule) ConcurrentModule(com.torodb.concurrent.guice.ConcurrentModule) DefaultBuildProperties(com.torodb.packaging.DefaultBuildProperties) CoreModule(com.torodb.core.guice.CoreModule) MetainfModule(com.torodb.metainfo.guice.MetainfModule) MongodServerConfig(com.torodb.mongodb.core.MongodServerConfig)

Aggregations

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