use of org.graylog2.shared.bindings.providers.ProxiedRequestsExecutorService in project graylog2-server by Graylog2.
the class GenericBindings method configure.
@Override
protected void configure() {
// This is holding all our metrics.
bind(MetricRegistry.class).toProvider(MetricRegistryProvider.class).asEagerSingleton();
// must not be a singleton!
bind(LocalMetricRegistry.class).in(Scopes.NO_SCOPE);
install(new FactoryModuleBuilder().build(DecodingProcessor.Factory.class));
bind(ProcessBuffer.class).asEagerSingleton();
bind(InputBuffer.class).to(InputBufferImpl.class);
bind(NodeId.class).toProvider(NodeIdProvider.class);
bind(ServiceManager.class).toProvider(ServiceManagerProvider.class).asEagerSingleton();
bind(HashedWheelTimer.class).toInstance(new HashedWheelTimer());
bind(ThroughputCounter.class);
bind(EventBus.class).toProvider(EventBusProvider.class).in(Scopes.SINGLETON);
bind(Semaphore.class).annotatedWith(Names.named("JournalSignal")).toInstance(new Semaphore(0));
install(new FactoryModuleBuilder().build(new TypeLiteral<IOState.Factory<MessageInput>>() {
}));
bind(InputRegistry.class).asEagerSingleton();
bind(OkHttpClient.class).toProvider(OkHttpClientProvider.class).asEagerSingleton();
bind(OkHttpClient.class).annotatedWith(Names.named("systemHttpClient")).toProvider(SystemOkHttpClientProvider.class).asEagerSingleton();
bind(MimetypesFileTypeMap.class).toInstance(new MimetypesFileTypeMap());
bind(ExecutorService.class).annotatedWith(Names.named("proxiedRequestsExecutorService")).toProvider(ProxiedRequestsExecutorService.class).asEagerSingleton();
}
Aggregations