use of com.torodb.core.metrics.guice.MetricsModule 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();
}
use of com.torodb.core.metrics.guice.MetricsModule in project torodb by torodb.
the class OplogTestContextResourceRule method before.
@Override
protected void before() throws Throwable {
testInjector = Guice.createInjector(new ReplTestModule(), new TorodServerTestModule(), new CoreModule(), new BackendModule(), new DerbyBackendModule(), new MetainfModule(), new D2RModule(), new MemoryTorodModule(), new MetricsModule(new MetricsConfig() {
@Override
public Boolean getMetricsEnabled() {
return true;
}
}), new ConcurrentModule(), new MongoLayerModule(), new MongodServerTestModule(), specificModuleSupplier.get());
torodServer = testInjector.getInstance(TorodBundle.class).getTorodServer();
torodServer.startAsync();
mongodServer = testInjector.getInstance(MongodServer.class);
mongodServer.startAsync();
mongodServer.awaitRunning();
assert mongodServer.getTorodServer().equals(torodServer);
torodServer.awaitRunning();
oplogManager = testInjector.getInstance(OplogManager.class);
oplogManager.startAsync();
oplogManager.awaitRunning();
aobe = testInjector.getInstance(AnalyzedOplogBatchExecutor.class);
aobe.startAsync();
aobe.awaitRunning();
oplogApplier = testInjector.getInstance(OplogApplier.class);
testContext = new DefaultOplogTestContext(mongodServer, oplogApplier);
}
use of com.torodb.core.metrics.guice.MetricsModule 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();
}
Aggregations