Search in sources :

Example 1 with D2RModule

use of com.torodb.d2r.guice.D2RModule in project torodb by torodb.

the class ToroDbRuntimeModule method configure.

@Override
protected void configure() {
    binder().requireExplicitBindings();
    bind(BackendService.class).toInstance(backend.getBackendService());
    expose(BackendService.class);
    install(new D2RModule());
    install(new SqlTorodModule());
    install(new MongoLayerModule());
    expose(MongodServer.class);
    expose(TorodbCommandsLibrary.class);
    expose(ObjectIdFactory.class);
}
Also used : BackendService(com.torodb.core.backend.BackendService) SqlTorodModule(com.torodb.torod.guice.SqlTorodModule) MongoLayerModule(com.torodb.mongodb.guice.MongoLayerModule) D2RModule(com.torodb.d2r.guice.D2RModule)

Example 2 with D2RModule

use of com.torodb.d2r.guice.D2RModule 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);
}
Also used : AnalyzedOplogBatchExecutor(com.torodb.mongodb.repl.oplogreplier.batch.AnalyzedOplogBatchExecutor) MongoLayerModule(com.torodb.mongodb.guice.MongoLayerModule) D2RModule(com.torodb.d2r.guice.D2RModule) OplogManager(com.torodb.mongodb.repl.OplogManager) ConcurrentModule(com.torodb.concurrent.guice.ConcurrentModule) MetricsConfig(com.torodb.core.metrics.MetricsConfig) MetricsModule(com.torodb.core.metrics.guice.MetricsModule) CoreModule(com.torodb.core.guice.CoreModule) BackendModule(com.torodb.backend.guice.BackendModule) DerbyBackendModule(com.torodb.backend.derby.guice.DerbyBackendModule) MetainfModule(com.torodb.metainfo.guice.MetainfModule) MongodServer(com.torodb.mongodb.core.MongodServer) MemoryTorodModule(com.torodb.torod.guice.MemoryTorodModule) DerbyBackendModule(com.torodb.backend.derby.guice.DerbyBackendModule)

Example 3 with D2RModule

use of com.torodb.d2r.guice.D2RModule in project torodb by torodb.

the class StampedeRuntimeModule method configure.

@Override
protected void configure() {
    binder().requireExplicitBindings();
    bind(ConsistencyHandler.class).toInstance(consistencyHandler);
    expose(ConsistencyHandler.class);
    bind(BackendService.class).toInstance(backend.getBackendService());
    expose(BackendService.class);
    install(new D2RModule());
    install(new SqlTorodModule());
}
Also used : BackendService(com.torodb.core.backend.BackendService) SqlTorodModule(com.torodb.torod.guice.SqlTorodModule) D2RModule(com.torodb.d2r.guice.D2RModule) ConsistencyHandler(com.torodb.mongodb.repl.ConsistencyHandler)

Aggregations

D2RModule (com.torodb.d2r.guice.D2RModule)3 BackendService (com.torodb.core.backend.BackendService)2 MongoLayerModule (com.torodb.mongodb.guice.MongoLayerModule)2 SqlTorodModule (com.torodb.torod.guice.SqlTorodModule)2 DerbyBackendModule (com.torodb.backend.derby.guice.DerbyBackendModule)1 BackendModule (com.torodb.backend.guice.BackendModule)1 ConcurrentModule (com.torodb.concurrent.guice.ConcurrentModule)1 CoreModule (com.torodb.core.guice.CoreModule)1 MetricsConfig (com.torodb.core.metrics.MetricsConfig)1 MetricsModule (com.torodb.core.metrics.guice.MetricsModule)1 MetainfModule (com.torodb.metainfo.guice.MetainfModule)1 MongodServer (com.torodb.mongodb.core.MongodServer)1 ConsistencyHandler (com.torodb.mongodb.repl.ConsistencyHandler)1 OplogManager (com.torodb.mongodb.repl.OplogManager)1 AnalyzedOplogBatchExecutor (com.torodb.mongodb.repl.oplogreplier.batch.AnalyzedOplogBatchExecutor)1 MemoryTorodModule (com.torodb.torod.guice.MemoryTorodModule)1