Search in sources :

Example 1 with EventProcessorOnRunner

use of com.radixdlt.environment.EventProcessorOnRunner in project radixdlt by radixdlt.

the class RxEnvironmentModule method configure.

@Override
public void configure() {
    ScheduledExecutorService ses = Executors.newSingleThreadScheduledExecutor(ThreadFactories.daemonThreads("TimeoutSender"));
    bind(Environment.class).to(RxEnvironment.class);
    bind(ScheduledExecutorService.class).toInstance(ses);
    // TODO: Remove, still required by SimulationNodes.java
    bind(new TypeLiteral<Observable<LedgerUpdate>>() {
    }).toProvider(new ObservableProvider<>(LedgerUpdate.class));
    bind(new TypeLiteral<Observable<BFTHighQCUpdate>>() {
    }).toProvider(new ObservableProvider<>(BFTHighQCUpdate.class));
    Multibinder.newSetBinder(binder(), new TypeLiteral<RxRemoteDispatcher<?>>() {
    });
    Multibinder.newSetBinder(binder(), new TypeLiteral<EventProcessorOnRunner<?>>() {
    });
    Multibinder.newSetBinder(binder(), new TypeLiteral<RemoteEventProcessorOnRunner<?>>() {
    });
    Multibinder.newSetBinder(binder(), new TypeLiteral<ScheduledEventProducerOnRunner<?>>() {
    });
}
Also used : LedgerUpdate(com.radixdlt.ledger.LedgerUpdate) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) RemoteEventProcessorOnRunner(com.radixdlt.environment.RemoteEventProcessorOnRunner) ScheduledEventProducerOnRunner(com.radixdlt.environment.ScheduledEventProducerOnRunner) TypeLiteral(com.google.inject.TypeLiteral) EventProcessorOnRunner(com.radixdlt.environment.EventProcessorOnRunner) RemoteEventProcessorOnRunner(com.radixdlt.environment.RemoteEventProcessorOnRunner) Environment(com.radixdlt.environment.Environment) BFTHighQCUpdate(com.radixdlt.hotstuff.bft.BFTHighQCUpdate)

Aggregations

TypeLiteral (com.google.inject.TypeLiteral)1 Environment (com.radixdlt.environment.Environment)1 EventProcessorOnRunner (com.radixdlt.environment.EventProcessorOnRunner)1 RemoteEventProcessorOnRunner (com.radixdlt.environment.RemoteEventProcessorOnRunner)1 ScheduledEventProducerOnRunner (com.radixdlt.environment.ScheduledEventProducerOnRunner)1 BFTHighQCUpdate (com.radixdlt.hotstuff.bft.BFTHighQCUpdate)1 LedgerUpdate (com.radixdlt.ledger.LedgerUpdate)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1