@Override protected void configure() { bind(River.class).to(MongoDBRiver.class).asEagerSingleton(); }
@Override public void applyTo(ScopedBindingBuilder scopedBindingBuilder) { scopedBindingBuilder.asEagerSingleton(); } };
@Override protected void configure() { bind(ActionFilters.class).toInstance(actionFilters); bind(DestructiveOperations.class).toInstance(destructiveOperations); if (false == transportClient) { // Supporting classes only used when not a transport client bind(AutoCreateIndex.class).toInstance(autoCreateIndex); bind(TransportLivenessAction.class).asEagerSingleton(); // register GenericAction -> transportAction Map used by NodeClient @SuppressWarnings("rawtypes") MapBinder<GenericAction, TransportAction> transportActionsBinder = MapBinder.newMapBinder(binder(), GenericAction.class, TransportAction.class); for (ActionHandler<?, ?> action : actions.values()) { // bind the action as eager singleton, so the map binder one will reuse it bind(action.getTransportAction()).asEagerSingleton(); transportActionsBinder.addBinding(action.getAction()).to(action.getTransportAction()).asEagerSingleton(); for (Class<?> supportAction : action.getSupportTransportActions()) { bind(supportAction).asEagerSingleton(); } } } }
@Override protected void configure() { bind(Discovery.class).to(FabricDiscovery.class).asEagerSingleton(); } }
@Override protected void configure() { bind(IndexGateway.class).to(HdfsIndexGateway.class).asEagerSingleton(); } }
@Override protected void configure(){ bind(River.class).to(S3River.class).asEagerSingleton(); } }
@Override protected void configure() { bind(River.class).to(GitHubRiver.class).asEagerSingleton(); } }
@Override protected void configure() { this.bind(HttpServerTransport.class) .to(TomcatHttpServerTransport.class).asEagerSingleton(); }
@Override protected void configure() { bind(Discovery.class).to(FabricDiscovery.class).asEagerSingleton(); } }
@Override protected void configure() { bind(River.class).to(MysqlRiver.class).asEagerSingleton(); } }
@Override protected void configure() { bind(new TypeLiteral<Console<PrintStream>>(){}).to(JLineConsole.class).asEagerSingleton(); bind(Completer.class).to(JLineRhinoCompleter.class).asEagerSingleton(); bind(CompletionHandler.class).to(JLineCompletionHandler.class).asEagerSingleton(); } }
@Override protected void bindDiscovery() { bind(Discovery.class).to(FabricDiscovery.class).asEagerSingleton(); } }
@Override protected void configure() { bind(Discovery.class).to(FabricDiscovery.class).asEagerSingleton(); } }
@Override protected void configure() { bind(HttpServerTransport.class).to(JettyHttpServerTransport.class).asEagerSingleton(); bind(ESLoggerWrapper.class).asEagerSingleton(); } }
@SuppressWarnings({"unchecked"}) @Override protected void configure() { bind(HttpServerTransport.class).to(httpServerTransportClass).asEagerSingleton(); bind(HttpServer.class).asEagerSingleton(); }
@Override protected void configure() { bind(AwsS3Service.class).to(getS3ServiceClass(settings)).asEagerSingleton(); bind(AwsEc2Service.class).asEagerSingleton(); }
@Override protected void configure() { bind(ZMQRestImpl.class).asEagerSingleton(); bind(ZMQServerTransport.class).to(ZMQQueueServerImpl.class).asEagerSingleton(); bind(ZMQServer.class).asEagerSingleton(); } }
@Override protected void configure() { bind(DirectoryService.class).to(shardDirectory).asEagerSingleton(); bind(Store.class).asEagerSingleton(); bind(ShardLock.class).toInstance(lock); bind(Store.OnClose.class).toInstance(closeCallback); bind(ShardPath.class).toInstance(path); } }
@Override protected void configure() { bind(TransportExportAction.class).asEagerSingleton(); bind(ExportParser.class).asEagerSingleton(); bind(Exporter.class).asEagerSingleton(); MapBinder<GenericAction, TransportAction> transportActionsBinder = MapBinder.newMapBinder(binder(), GenericAction.class, TransportAction.class); transportActionsBinder.addBinding(ExportAction.INSTANCE).to(TransportExportAction.class).asEagerSingleton(); MapBinder<String, GenericAction> actionsBinder = MapBinder.newMapBinder(binder(), String.class, GenericAction.class); actionsBinder.addBinding(ExportAction.NAME).toInstance(ExportAction.INSTANCE); } }
@Override protected void configure() { bind(TransportImportAction.class).asEagerSingleton(); bind(ImportParser.class).asEagerSingleton(); bind(Importer.class).asEagerSingleton(); MapBinder<GenericAction, TransportAction> transportActionsBinder = MapBinder.newMapBinder(binder(), GenericAction.class, TransportAction.class); transportActionsBinder.addBinding(ImportAction.INSTANCE).to(TransportImportAction.class).asEagerSingleton(); MapBinder<String, GenericAction> actionsBinder = MapBinder.newMapBinder(binder(), String.class, GenericAction.class); actionsBinder.addBinding(ImportAction.NAME).toInstance(ImportAction.INSTANCE); }