org.elasticsearch.action.ActionModule Java Examples
The following examples show how to use
org.elasticsearch.action.ActionModule.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SirenJoinPlugin.java From siren-join with GNU Affero General Public License v3.0 | 5 votes |
public void onModule(ActionModule module) { module.registerAction(TermsByQueryAction.INSTANCE, TransportTermsByQueryAction.class); module.registerAction(CoordinateSearchAction.INSTANCE, TransportCoordinateSearchAction.class); module.registerAction(CoordinateMultiSearchAction.INSTANCE, TransportCoordinateMultiSearchAction.class); module.registerAction(ClearFilterJoinCacheAction.INSTANCE, TransportClearFilterJoinCacheAction.class); module.registerAction(StatsFilterJoinCacheAction.INSTANCE, TransportStatsFilterJoinCacheAction.class); module.registerAction(GetIndicesVersionAction.INSTANCE, TransportGetIndicesVersionAction.class); }
Example #2
Source File: BlobPlugin.java From Elasticsearch with Apache License 2.0 | 4 votes |
public void onModule(ActionModule module) { module.registerAction(PutChunkAction.INSTANCE, TransportPutChunkAction.class); module.registerAction(StartBlobAction.INSTANCE, TransportStartBlobAction.class); module.registerAction(DeleteBlobAction.INSTANCE, TransportDeleteBlobAction.class); }
Example #3
Source File: SQLPlugin.java From Elasticsearch with Apache License 2.0 | 4 votes |
public void onModule(ActionModule actionModule) { actionModule.registerAction(SQLAction.INSTANCE, TransportSQLAction.class); actionModule.registerAction(SQLBulkAction.INSTANCE, TransportSQLBulkAction.class); }
Example #4
Source File: CrateCorePlugin.java From Elasticsearch with Apache License 2.0 | 4 votes |
public void onModule(ActionModule module) { module.registerFilter(AuthActionFilter.class); }
Example #5
Source File: TransportClient.java From Elasticsearch with Apache License 2.0 | 4 votes |
/** * Builds a new instance of the transport client. */ public TransportClient build() { Settings settings = InternalSettingsPreparer.prepareSettings(this.settings); settings = settingsBuilder() .put(NettyTransport.PING_SCHEDULE, "5s") // enable by default the transport schedule ping interval .put(settings) .put("network.server", false) .put("node.client", true) .put(CLIENT_TYPE_SETTING, CLIENT_TYPE) .build(); PluginsService pluginsService = new PluginsService(settings, null, null, pluginClasses); this.settings = pluginsService.updatedSettings(); Version version = Version.CURRENT; final ThreadPool threadPool = new ThreadPool(settings); NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(); boolean success = false; try { ModulesBuilder modules = new ModulesBuilder(); modules.add(new Version.Module(version)); // plugin modules must be added here, before others or we can get crazy injection errors... for (Module pluginModule : pluginsService.nodeModules()) { modules.add(pluginModule); } modules.add(new PluginsModule(pluginsService)); modules.add(new SettingsModule(this.settings)); modules.add(new NetworkModule(namedWriteableRegistry)); modules.add(new ClusterNameModule(this.settings)); modules.add(new ThreadPoolModule(threadPool)); modules.add(new TransportModule(this.settings, namedWriteableRegistry)); modules.add(new SearchModule() { @Override protected void configure() { // noop } }); modules.add(new ActionModule(true)); modules.add(new ClientTransportModule()); modules.add(new CircuitBreakerModule(this.settings)); pluginsService.processModules(modules); Injector injector = modules.createInjector(); final TransportService transportService = injector.getInstance(TransportService.class); transportService.start(); transportService.acceptIncomingRequests(); TransportClient transportClient = new TransportClient(injector); success = true; return transportClient; } finally { if (!success) { ThreadPool.terminate(threadPool, 10, TimeUnit.SECONDS); } } }
Example #6
Source File: GathererPlugin.java From elasticsearch-gatherer with Apache License 2.0 | 4 votes |
public void onModule(ActionModule module) { module.registerAction(DeployAction.INSTANCE, TransportDeployAction.class); module.registerAction(GathererAction.INSTANCE, TransportGathererAction.class); }
Example #7
Source File: HelperPlugin.java From elasticsearch-helper with Apache License 2.0 | 4 votes |
public void onModule(ActionModule module) { module.registerAction(IngestAction.INSTANCE, TransportIngestAction.class); }
Example #8
Source File: TransportClient.java From elasticsearch-helper with Apache License 2.0 | 4 votes |
public TransportClient build() { Settings settings = InternalSettingsPreparer.prepareSettings(this.settings); settings = settingsBuilder() .put("transport.ping.schedule", this.settings.get("ping.interval", "30s")) .put(settings) .put("network.server", false) .put("node.client", true) .put(CLIENT_TYPE_SETTING, CLIENT_TYPE) .build(); PluginsService pluginsService = new PluginsService(settings, null, null, pluginClasses); this.settings = pluginsService.updatedSettings(); Version version = Version.CURRENT; final ThreadPool threadPool = new ThreadPool(settings); final NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(); boolean success = false; try { ModulesBuilder modules = new ModulesBuilder(); modules.add(new Version.Module(version)); // plugin modules must be added here, before others or we can get crazy injection errors... for (Module pluginModule : pluginsService.nodeModules()) { modules.add(pluginModule); } modules.add(new PluginsModule(pluginsService)); modules.add(new SettingsModule(this.settings)); modules.add(new NetworkModule(namedWriteableRegistry)); modules.add(new ClusterNameModule(this.settings)); modules.add(new ThreadPoolModule(threadPool)); modules.add(new TransportModule(this.settings, namedWriteableRegistry)); modules.add(new SearchModule() { @Override protected void configure() { // noop } }); modules.add(new ActionModule(true)); modules.add(new ClientTransportModule(hostFailedListener)); modules.add(new CircuitBreakerModule(this.settings)); pluginsService.processModules(modules); Injector injector = modules.createInjector(); injector.getInstance(TransportService.class).start(); TransportClient transportClient = new TransportClient(injector); success = true; return transportClient; } finally { if (!success) { ThreadPool.terminate(threadPool, 10, TimeUnit.SECONDS); } } }