use of com.torodb.backend.guice.BackendModule 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.backend.guice.BackendModule in project torodb by torodb.
the class BackendImplementationModule method configure.
@Override
protected void configure() {
install(new BackendModule());
bind(configurationClass).toInstance(configurationClass.cast(backendImplementation));
bind(backendConfigurationClass).to(backendConfigurationMapperClass);
install(backendModuleSupplier.get());
expose(SqlHelper.class);
expose(SqlInterface.class);
expose(SchemaUpdater.class);
expose(DbBackendService.class);
expose(IdentifierConstraints.class);
expose(BackendBundleFactory.class);
expose(BackendTransactionJobFactory.class);
expose(ReservedIdGenerator.class);
expose(SnapshotUpdater.class);
}
Aggregations