mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-19 04:45:07 -04:00
Remove unnecessary generic params from action classes (#126364)
Transport actions have associated request and response classes. However, the base type restrictions are not necessary to duplicate when creating a map of transport actions. Relatedly, the ActionHandler class doesn't actually need strongly typed action type and classes since they are lost when shoved into the node client map. This commit removes these type restrictions and generic parameters.
This commit is contained in:
parent
9feac7833e
commit
991e80d56e
77 changed files with 629 additions and 782 deletions
|
@ -8,8 +8,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.plugin.noop;
|
package org.elasticsearch.plugin.noop;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.bulk.BulkResponse;
|
import org.elasticsearch.action.bulk.BulkResponse;
|
||||||
import org.elasticsearch.action.search.SearchResponse;
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
|
@ -41,10 +39,10 @@ public class NoopPlugin extends Plugin implements ActionPlugin {
|
||||||
public static final ActionType<BulkResponse> NOOP_BULK_ACTION = new ActionType<>("mock:data/write/bulk");
|
public static final ActionType<BulkResponse> NOOP_BULK_ACTION = new ActionType<>("mock:data/write/bulk");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(NOOP_BULK_ACTION, TransportNoopBulkAction.class),
|
new ActionHandler(NOOP_BULK_ACTION, TransportNoopBulkAction.class),
|
||||||
new ActionHandler<>(NOOP_SEARCH_ACTION, TransportNoopSearchAction.class)
|
new ActionHandler(NOOP_SEARCH_ACTION, TransportNoopSearchAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@ package org.elasticsearch.datastreams;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.datastreams.CreateDataStreamAction;
|
import org.elasticsearch.action.datastreams.CreateDataStreamAction;
|
||||||
import org.elasticsearch.action.datastreams.DataStreamsStatsAction;
|
import org.elasticsearch.action.datastreams.DataStreamsStatsAction;
|
||||||
import org.elasticsearch.action.datastreams.DeleteDataStreamAction;
|
import org.elasticsearch.action.datastreams.DeleteDataStreamAction;
|
||||||
|
@ -225,24 +223,24 @@ public class DataStreamsPlugin extends Plugin implements ActionPlugin, HealthPlu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionHandler<>(CreateDataStreamAction.INSTANCE, CreateDataStreamTransportAction.class));
|
actions.add(new ActionHandler(CreateDataStreamAction.INSTANCE, CreateDataStreamTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(DeleteDataStreamAction.INSTANCE, DeleteDataStreamTransportAction.class));
|
actions.add(new ActionHandler(DeleteDataStreamAction.INSTANCE, DeleteDataStreamTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(GetDataStreamAction.INSTANCE, TransportGetDataStreamsAction.class));
|
actions.add(new ActionHandler(GetDataStreamAction.INSTANCE, TransportGetDataStreamsAction.class));
|
||||||
actions.add(new ActionHandler<>(DataStreamsStatsAction.INSTANCE, DataStreamsStatsTransportAction.class));
|
actions.add(new ActionHandler(DataStreamsStatsAction.INSTANCE, DataStreamsStatsTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(MigrateToDataStreamAction.INSTANCE, MigrateToDataStreamTransportAction.class));
|
actions.add(new ActionHandler(MigrateToDataStreamAction.INSTANCE, MigrateToDataStreamTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(PromoteDataStreamAction.INSTANCE, PromoteDataStreamTransportAction.class));
|
actions.add(new ActionHandler(PromoteDataStreamAction.INSTANCE, PromoteDataStreamTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(ModifyDataStreamsAction.INSTANCE, ModifyDataStreamsTransportAction.class));
|
actions.add(new ActionHandler(ModifyDataStreamsAction.INSTANCE, ModifyDataStreamsTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(PutDataStreamLifecycleAction.INSTANCE, TransportPutDataStreamLifecycleAction.class));
|
actions.add(new ActionHandler(PutDataStreamLifecycleAction.INSTANCE, TransportPutDataStreamLifecycleAction.class));
|
||||||
actions.add(new ActionHandler<>(GetDataStreamLifecycleAction.INSTANCE, TransportGetDataStreamLifecycleAction.class));
|
actions.add(new ActionHandler(GetDataStreamLifecycleAction.INSTANCE, TransportGetDataStreamLifecycleAction.class));
|
||||||
actions.add(new ActionHandler<>(DeleteDataStreamLifecycleAction.INSTANCE, TransportDeleteDataStreamLifecycleAction.class));
|
actions.add(new ActionHandler(DeleteDataStreamLifecycleAction.INSTANCE, TransportDeleteDataStreamLifecycleAction.class));
|
||||||
actions.add(new ActionHandler<>(ExplainDataStreamLifecycleAction.INSTANCE, TransportExplainDataStreamLifecycleAction.class));
|
actions.add(new ActionHandler(ExplainDataStreamLifecycleAction.INSTANCE, TransportExplainDataStreamLifecycleAction.class));
|
||||||
actions.add(new ActionHandler<>(GetDataStreamLifecycleStatsAction.INSTANCE, TransportGetDataStreamLifecycleStatsAction.class));
|
actions.add(new ActionHandler(GetDataStreamLifecycleStatsAction.INSTANCE, TransportGetDataStreamLifecycleStatsAction.class));
|
||||||
if (DataStream.isFailureStoreFeatureFlagEnabled()) {
|
if (DataStream.isFailureStoreFeatureFlagEnabled()) {
|
||||||
actions.add(new ActionHandler<>(GetDataStreamOptionsAction.INSTANCE, TransportGetDataStreamOptionsAction.class));
|
actions.add(new ActionHandler(GetDataStreamOptionsAction.INSTANCE, TransportGetDataStreamOptionsAction.class));
|
||||||
actions.add(new ActionHandler<>(PutDataStreamOptionsAction.INSTANCE, TransportPutDataStreamOptionsAction.class));
|
actions.add(new ActionHandler(PutDataStreamOptionsAction.INSTANCE, TransportPutDataStreamOptionsAction.class));
|
||||||
actions.add(new ActionHandler<>(DeleteDataStreamOptionsAction.INSTANCE, TransportDeleteDataStreamOptionsAction.class));
|
actions.add(new ActionHandler(DeleteDataStreamOptionsAction.INSTANCE, TransportDeleteDataStreamOptionsAction.class));
|
||||||
}
|
}
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.ingest.common;
|
package org.elasticsearch.ingest.common;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -81,8 +79,8 @@ public class IngestCommonPlugin extends Plugin implements ActionPlugin, IngestPl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(GrokProcessorGetAction.INSTANCE, GrokProcessorGetAction.TransportAction.class));
|
return List.of(new ActionHandler(GrokProcessorGetAction.INSTANCE, GrokProcessorGetAction.TransportAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
package org.elasticsearch.ingest.geoip;
|
package org.elasticsearch.ingest.geoip;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.NamedDiff;
|
import org.elasticsearch.cluster.NamedDiff;
|
||||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||||
|
@ -182,12 +180,12 @@ public class IngestGeoIpPlugin extends Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(GeoIpStatsAction.INSTANCE, GeoIpStatsTransportAction.class),
|
new ActionHandler(GeoIpStatsAction.INSTANCE, GeoIpStatsTransportAction.class),
|
||||||
new ActionHandler<>(GetDatabaseConfigurationAction.INSTANCE, TransportGetDatabaseConfigurationAction.class),
|
new ActionHandler(GetDatabaseConfigurationAction.INSTANCE, TransportGetDatabaseConfigurationAction.class),
|
||||||
new ActionHandler<>(DeleteDatabaseConfigurationAction.INSTANCE, TransportDeleteDatabaseConfigurationAction.class),
|
new ActionHandler(DeleteDatabaseConfigurationAction.INSTANCE, TransportDeleteDatabaseConfigurationAction.class),
|
||||||
new ActionHandler<>(PutDatabaseConfigurationAction.INSTANCE, TransportPutDatabaseConfigurationAction.class)
|
new ActionHandler(PutDatabaseConfigurationAction.INSTANCE, TransportPutDatabaseConfigurationAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.script.mustache;
|
package org.elasticsearch.script.mustache;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -49,10 +47,10 @@ public class MustachePlugin extends Plugin implements ScriptPlugin, ActionPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(SEARCH_TEMPLATE_ACTION, TransportSearchTemplateAction.class),
|
new ActionHandler(SEARCH_TEMPLATE_ACTION, TransportSearchTemplateAction.class),
|
||||||
new ActionHandler<>(MULTI_SEARCH_TEMPLATE_ACTION, TransportMultiSearchTemplateAction.class)
|
new ActionHandler(MULTI_SEARCH_TEMPLATE_ACTION, TransportMultiSearchTemplateAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
package org.elasticsearch.painless;
|
package org.elasticsearch.painless;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -164,10 +162,10 @@ public final class PainlessPlugin extends Plugin implements ScriptPlugin, Extens
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionHandler<>(PainlessExecuteAction.INSTANCE, PainlessExecuteAction.TransportAction.class));
|
actions.add(new ActionHandler(PainlessExecuteAction.INSTANCE, PainlessExecuteAction.TransportAction.class));
|
||||||
actions.add(new ActionHandler<>(PainlessContextAction.INSTANCE, PainlessContextAction.TransportAction.class));
|
actions.add(new ActionHandler(PainlessContextAction.INSTANCE, PainlessContextAction.TransportAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.index.rankeval;
|
package org.elasticsearch.index.rankeval;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -38,8 +36,8 @@ public class RankEvalPlugin extends Plugin implements ActionPlugin {
|
||||||
public static final ActionType<RankEvalResponse> ACTION = new ActionType<>("indices:data/read/rank_eval");
|
public static final ActionType<RankEvalResponse> ACTION = new ActionType<>("indices:data/read/rank_eval");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(new ActionHandler<>(ACTION, TransportRankEvalAction.class));
|
return Arrays.asList(new ActionHandler(ACTION, TransportRankEvalAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.reindex;
|
package org.elasticsearch.reindex;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
@ -47,12 +45,12 @@ public class ReindexPlugin extends Plugin implements ActionPlugin {
|
||||||
public static final ActionType<ListTasksResponse> RETHROTTLE_ACTION = new ActionType<>("cluster:admin/reindex/rethrottle");
|
public static final ActionType<ListTasksResponse> RETHROTTLE_ACTION = new ActionType<>("cluster:admin/reindex/rethrottle");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(ReindexAction.INSTANCE, TransportReindexAction.class),
|
new ActionHandler(ReindexAction.INSTANCE, TransportReindexAction.class),
|
||||||
new ActionHandler<>(UpdateByQueryAction.INSTANCE, TransportUpdateByQueryAction.class),
|
new ActionHandler(UpdateByQueryAction.INSTANCE, TransportUpdateByQueryAction.class),
|
||||||
new ActionHandler<>(DeleteByQueryAction.INSTANCE, TransportDeleteByQueryAction.class),
|
new ActionHandler(DeleteByQueryAction.INSTANCE, TransportDeleteByQueryAction.class),
|
||||||
new ActionHandler<>(RETHROTTLE_ACTION, TransportRethrottleAction.class)
|
new ActionHandler(RETHROTTLE_ACTION, TransportRethrottleAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.rest.root;
|
package org.elasticsearch.rest.root;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -49,7 +47,7 @@ public class MainRestPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(MAIN_ACTION, TransportMainAction.class));
|
return List.of(new ActionHandler(MAIN_ACTION, TransportMainAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,8 +340,8 @@ public class Netty4ChunkedContinuationsIT extends ESNetty4IntegTestCase {
|
||||||
private static final ActionType<YieldsContinuationsPlugin.Response> TYPE = new ActionType<>("test:yields_continuations");
|
private static final ActionType<YieldsContinuationsPlugin.Response> TYPE = new ActionType<>("test:yields_continuations");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public Collection<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TYPE, TransportYieldsContinuationsAction.class));
|
return List.of(new ActionHandler(TYPE, TransportYieldsContinuationsAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Request extends ActionRequest {
|
public static class Request extends ActionRequest {
|
||||||
|
@ -521,8 +521,8 @@ public class Netty4ChunkedContinuationsIT extends ESNetty4IntegTestCase {
|
||||||
private static final ActionType<Response> TYPE = new ActionType<>("test:infinite_continuations");
|
private static final ActionType<Response> TYPE = new ActionType<>("test:infinite_continuations");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public Collection<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TYPE, TransportInfiniteContinuationsAction.class));
|
return List.of(new ActionHandler(TYPE, TransportInfiniteContinuationsAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Request extends ActionRequest {
|
public static class Request extends ActionRequest {
|
||||||
|
|
|
@ -603,8 +603,8 @@ public class CancellableTasksIT extends ESIntegTestCase {
|
||||||
|
|
||||||
public static class TaskPlugin extends Plugin implements ActionPlugin {
|
public static class TaskPlugin extends Plugin implements ActionPlugin {
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Collections.singletonList(new ActionHandler<>(TransportTestAction.ACTION, TransportTestAction.class));
|
return Collections.singletonList(new ActionHandler(TransportTestAction.ACTION, TransportTestAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,8 @@ public class ListTasksIT extends ESSingleNodeTestCase {
|
||||||
volatile CyclicBarrier barrier;
|
volatile CyclicBarrier barrier;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TEST_ACTION, TestTransportAction.class));
|
return List.of(new ActionHandler(TEST_ACTION, TestTransportAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ package org.elasticsearch.action.support.master;
|
||||||
|
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionRequestValidationException;
|
import org.elasticsearch.action.ActionRequestValidationException;
|
||||||
import org.elasticsearch.action.ActionResponse;
|
import org.elasticsearch.action.ActionResponse;
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
|
@ -230,8 +229,8 @@ public class TransportMasterNodeActionIT extends ESIntegTestCase {
|
||||||
|
|
||||||
public static final class TestActionPlugin extends Plugin implements ActionPlugin {
|
public static final class TestActionPlugin extends Plugin implements ActionPlugin {
|
||||||
@Override
|
@Override
|
||||||
public Collection<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public Collection<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TEST_ACTION_TYPE, TestTransportAction.class));
|
return List.of(new ActionHandler(TEST_ACTION_TYPE, TestTransportAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ package org.elasticsearch.action.support.replication;
|
||||||
|
|
||||||
import org.elasticsearch.ExceptionsHelper;
|
import org.elasticsearch.ExceptionsHelper;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.PlainActionFuture;
|
import org.elasticsearch.action.support.PlainActionFuture;
|
||||||
|
@ -128,8 +126,8 @@ public class TransportReplicationActionBypassCircuitBreakerOnReplicaIT extends E
|
||||||
public TestPlugin() {}
|
public TestPlugin() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TestAction.TYPE, TestAction.class));
|
return List.of(new ActionHandler(TestAction.TYPE, TestAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
package org.elasticsearch.action.support.replication;
|
package org.elasticsearch.action.support.replication;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.cluster.action.shard.ShardStateAction;
|
import org.elasticsearch.cluster.action.shard.ShardStateAction;
|
||||||
|
@ -141,8 +139,8 @@ public class TransportReplicationActionRetryOnClosedNodeIT extends ESIntegTestCa
|
||||||
public TestPlugin() {}
|
public TestPlugin() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TestAction.TYPE, TestAction.class));
|
return List.of(new ActionHandler(TestAction.TYPE, TestAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -93,8 +93,8 @@ public class MockedRequestActionBasedRerankerIT extends AbstractRerankerIT {
|
||||||
public static class RerankerServicePlugin extends Plugin implements ActionPlugin {
|
public static class RerankerServicePlugin extends Plugin implements ActionPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public Collection<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TEST_RERANKING_ACTION_TYPE, TestRerankingTransportAction.class));
|
return List.of(new ActionHandler(TEST_RERANKING_ACTION_TYPE, TestRerankingTransportAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,7 @@ public class ActionModule extends AbstractModule {
|
||||||
private final ClusterSettings clusterSettings;
|
private final ClusterSettings clusterSettings;
|
||||||
private final SettingsFilter settingsFilter;
|
private final SettingsFilter settingsFilter;
|
||||||
private final List<ActionPlugin> actionPlugins;
|
private final List<ActionPlugin> actionPlugins;
|
||||||
private final Map<String, ActionHandler<?, ?>> actions;
|
private final Map<String, ActionHandler> actions;
|
||||||
private final ActionFilters actionFilters;
|
private final ActionFilters actionFilters;
|
||||||
private final IncrementalBulkService bulkService;
|
private final IncrementalBulkService bulkService;
|
||||||
private final ProjectIdResolver projectIdResolver;
|
private final ProjectIdResolver projectIdResolver;
|
||||||
|
@ -605,18 +605,18 @@ public class ActionModule extends AbstractModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, ActionHandler<?, ?>> getActions() {
|
public Map<String, ActionHandler> getActions() {
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, ActionHandler<?, ?>> setupActions(List<ActionPlugin> actionPlugins) {
|
static Map<String, ActionHandler> setupActions(List<ActionPlugin> actionPlugins) {
|
||||||
// Subclass NamedRegistry for easy registration
|
// Subclass NamedRegistry for easy registration
|
||||||
class ActionRegistry extends NamedRegistry<ActionHandler<?, ?>> {
|
class ActionRegistry extends NamedRegistry<ActionHandler> {
|
||||||
ActionRegistry() {
|
ActionRegistry() {
|
||||||
super("action");
|
super("action");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void register(ActionHandler<?, ?> handler) {
|
public void register(ActionHandler handler) {
|
||||||
register(handler.getAction().name(), handler);
|
register(handler.getAction().name(), handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,7 +624,7 @@ public class ActionModule extends AbstractModule {
|
||||||
ActionType<Response> action,
|
ActionType<Response> action,
|
||||||
Class<? extends TransportAction<Request, Response>> transportAction
|
Class<? extends TransportAction<Request, Response>> transportAction
|
||||||
) {
|
) {
|
||||||
register(new ActionHandler<>(action, transportAction));
|
register(new ActionHandler(action, transportAction));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ActionRegistry actions = new ActionRegistry();
|
ActionRegistry actions = new ActionRegistry();
|
||||||
|
@ -1053,7 +1053,7 @@ public class ActionModule extends AbstractModule {
|
||||||
ActionType.class,
|
ActionType.class,
|
||||||
TransportAction.class
|
TransportAction.class
|
||||||
);
|
);
|
||||||
for (ActionHandler<?, ?> action : actions.values()) {
|
for (ActionHandler action : actions.values()) {
|
||||||
// bind the action as eager singleton, so the map binder one will reuse it
|
// bind the action as eager singleton, so the map binder one will reuse it
|
||||||
bind(action.getTransportAction()).asEagerSingleton();
|
bind(action.getTransportAction()).asEagerSingleton();
|
||||||
transportActionsBinder.addBinding(action.getAction()).to(action.getTransportAction()).asEagerSingleton();
|
transportActionsBinder.addBinding(action.getAction()).to(action.getTransportAction()).asEagerSingleton();
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.util.function.Supplier;
|
||||||
*/
|
*/
|
||||||
public class NodeClient extends AbstractClient {
|
public class NodeClient extends AbstractClient {
|
||||||
|
|
||||||
private Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions;
|
private Map<ActionType<?>, TransportAction<?, ?>> actions;
|
||||||
|
|
||||||
private TaskManager taskManager;
|
private TaskManager taskManager;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public class NodeClient extends AbstractClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initialize(
|
public void initialize(
|
||||||
Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions,
|
Map<ActionType<?>, TransportAction<?, ?>> actions,
|
||||||
TaskManager taskManager,
|
TaskManager taskManager,
|
||||||
Supplier<String> localNodeId,
|
Supplier<String> localNodeId,
|
||||||
Transport.Connection localConnection,
|
Transport.Connection localConnection,
|
||||||
|
|
|
@ -16,8 +16,6 @@ import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.TransportVersion;
|
import org.elasticsearch.TransportVersion;
|
||||||
import org.elasticsearch.action.ActionModule;
|
import org.elasticsearch.action.ActionModule;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.admin.cluster.repositories.reservedstate.ReservedRepositoryAction;
|
import org.elasticsearch.action.admin.cluster.repositories.reservedstate.ReservedRepositoryAction;
|
||||||
import org.elasticsearch.action.admin.indices.template.reservedstate.ReservedComposableIndexTemplateAction;
|
import org.elasticsearch.action.admin.indices.template.reservedstate.ReservedComposableIndexTemplateAction;
|
||||||
|
@ -1459,9 +1457,8 @@ class NodeConstruction {
|
||||||
// Due to Java's type erasure with generics, the injector can't give us exactly what we need, and we have
|
// Due to Java's type erasure with generics, the injector can't give us exactly what we need, and we have
|
||||||
// to resort to some evil casting.
|
// to resort to some evil casting.
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions =
|
Map<ActionType<?>, TransportAction<?, ?>> actions = forciblyCast(injector.getInstance(new Key<Map<ActionType, TransportAction>>() {
|
||||||
forciblyCast(injector.getInstance(new Key<Map<ActionType, TransportAction>>() {
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
client.initialize(
|
client.initialize(
|
||||||
actions,
|
actions,
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.plugins;
|
package org.elasticsearch.plugins;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.RequestValidators;
|
import org.elasticsearch.action.RequestValidators;
|
||||||
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
|
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
|
||||||
|
@ -41,10 +39,10 @@ import java.util.function.Supplier;
|
||||||
* <pre>{@code
|
* <pre>{@code
|
||||||
* {@literal @}Override
|
* {@literal @}Override
|
||||||
* public List<ActionHandler<?, ?>> getActions() {
|
* public List<ActionHandler<?, ?>> getActions() {
|
||||||
* return List.of(new ActionHandler<>(ReindexAction.INSTANCE, TransportReindexAction.class),
|
* return List.of(new ActionHandler(ReindexAction.INSTANCE, TransportReindexAction.class),
|
||||||
* new ActionHandler<>(UpdateByQueryAction.INSTANCE, TransportUpdateByQueryAction.class),
|
* new ActionHandler(UpdateByQueryAction.INSTANCE, TransportUpdateByQueryAction.class),
|
||||||
* new ActionHandler<>(DeleteByQueryAction.INSTANCE, TransportDeleteByQueryAction.class),
|
* new ActionHandler(DeleteByQueryAction.INSTANCE, TransportDeleteByQueryAction.class),
|
||||||
* new ActionHandler<>(RethrottleAction.INSTANCE, TransportRethrottleAction.class));
|
* new ActionHandler(RethrottleAction.INSTANCE, TransportRethrottleAction.class));
|
||||||
* }
|
* }
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*/
|
*/
|
||||||
|
@ -52,7 +50,7 @@ public interface ActionPlugin {
|
||||||
/**
|
/**
|
||||||
* Actions added by this plugin.
|
* Actions added by this plugin.
|
||||||
*/
|
*/
|
||||||
default Collection<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
default Collection<ActionHandler> getActions() {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,23 +99,23 @@ public interface ActionPlugin {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
final class ActionHandler<Request extends ActionRequest, Response extends ActionResponse> {
|
final class ActionHandler {
|
||||||
private final ActionType<Response> action;
|
private final ActionType<?> action;
|
||||||
private final Class<? extends TransportAction<Request, Response>> transportAction;
|
private final Class<? extends TransportAction<?, ?>> transportAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a record of an action, the {@linkplain TransportAction} that handles it.
|
* Create a record of an action, the {@linkplain TransportAction} that handles it.
|
||||||
*/
|
*/
|
||||||
public ActionHandler(ActionType<Response> action, Class<? extends TransportAction<Request, Response>> transportAction) {
|
public ActionHandler(ActionType<?> action, Class<? extends TransportAction<?, ?>> transportAction) {
|
||||||
this.action = action;
|
this.action = action;
|
||||||
this.transportAction = transportAction;
|
this.transportAction = transportAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionType<Response> getAction() {
|
public ActionType<?> getAction() {
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class<? extends TransportAction<Request, Response>> getTransportAction() {
|
public Class<? extends TransportAction<?, ?>> getTransportAction() {
|
||||||
return transportAction;
|
return transportAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +129,7 @@ public interface ActionPlugin {
|
||||||
if (obj == null || obj.getClass() != ActionHandler.class) {
|
if (obj == null || obj.getClass() != ActionHandler.class) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ActionHandler<?, ?> other = (ActionHandler<?, ?>) obj;
|
ActionHandler other = (ActionHandler) obj;
|
||||||
return Objects.equals(action, other.action) && Objects.equals(transportAction, other.transportAction);
|
return Objects.equals(action, other.action) && Objects.equals(transportAction, other.transportAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,18 +65,15 @@ public class ActionModuleTests extends ESTestCase {
|
||||||
public void testSetupActionsContainsKnownBuiltin() {
|
public void testSetupActionsContainsKnownBuiltin() {
|
||||||
assertThat(
|
assertThat(
|
||||||
ActionModule.setupActions(emptyList()),
|
ActionModule.setupActions(emptyList()),
|
||||||
hasEntry(
|
hasEntry(TransportNodesInfoAction.TYPE.name(), new ActionHandler(TransportNodesInfoAction.TYPE, TransportNodesInfoAction.class))
|
||||||
TransportNodesInfoAction.TYPE.name(),
|
|
||||||
new ActionHandler<>(TransportNodesInfoAction.TYPE, TransportNodesInfoAction.class)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPluginCantOverwriteBuiltinAction() {
|
public void testPluginCantOverwriteBuiltinAction() {
|
||||||
ActionPlugin dupsMainAction = new ActionPlugin() {
|
ActionPlugin dupsMainAction = new ActionPlugin() {
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return singletonList(new ActionHandler<>(TransportNodesInfoAction.TYPE, TransportNodesInfoAction.class));
|
return singletonList(new ActionHandler(TransportNodesInfoAction.TYPE, TransportNodesInfoAction.class));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Exception e = expectThrows(IllegalArgumentException.class, () -> ActionModule.setupActions(singletonList(dupsMainAction)));
|
Exception e = expectThrows(IllegalArgumentException.class, () -> ActionModule.setupActions(singletonList(dupsMainAction)));
|
||||||
|
@ -101,13 +98,13 @@ public class ActionModuleTests extends ESTestCase {
|
||||||
final var action = new ActionType<>("fake");
|
final var action = new ActionType<>("fake");
|
||||||
ActionPlugin registersFakeAction = new ActionPlugin() {
|
ActionPlugin registersFakeAction = new ActionPlugin() {
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return singletonList(new ActionHandler<>(action, FakeTransportAction.class));
|
return singletonList(new ActionHandler(action, FakeTransportAction.class));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
assertThat(
|
assertThat(
|
||||||
ActionModule.setupActions(singletonList(registersFakeAction)),
|
ActionModule.setupActions(singletonList(registersFakeAction)),
|
||||||
hasEntry("fake", new ActionHandler<>(action, FakeTransportAction.class))
|
hasEntry("fake", new ActionHandler(action, FakeTransportAction.class))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ package org.elasticsearch.action.admin.cluster.node.tasks;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.FailedNodeException;
|
import org.elasticsearch.action.FailedNodeException;
|
||||||
import org.elasticsearch.action.IndicesRequest;
|
import org.elasticsearch.action.IndicesRequest;
|
||||||
|
@ -77,10 +75,10 @@ public class TestTaskPlugin extends Plugin implements ActionPlugin, NetworkPlugi
|
||||||
public static final ActionType<UnblockTestTasksResponse> UNBLOCK_TASK_ACTION = new ActionType<>("cluster:admin/tasks/testunblock");
|
public static final ActionType<UnblockTestTasksResponse> UNBLOCK_TASK_ACTION = new ActionType<>("cluster:admin/tasks/testunblock");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(TEST_TASK_ACTION, TransportTestTaskAction.class),
|
new ActionHandler(TEST_TASK_ACTION, TransportTestTaskAction.class),
|
||||||
new ActionHandler<>(UNBLOCK_TASK_ACTION, TransportUnblockTestTasksAction.class)
|
new ActionHandler(UNBLOCK_TASK_ACTION, TransportUnblockTestTasksAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,8 @@ public class TransportActionFilterChainRefCountingTests extends ESSingleNodeTest
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(new ActionHandler<>(TYPE, TestAction.class));
|
return List.of(new ActionHandler(TYPE, TestAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -24,7 +24,10 @@ import org.elasticsearch.tasks.TaskManager;
|
||||||
import org.elasticsearch.transport.Transport;
|
import org.elasticsearch.transport.Transport;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
|
@ -36,23 +39,13 @@ public class NodeClientHeadersTests extends AbstractClientHeadersTestCase {
|
||||||
protected Client buildClient(Settings headersSettings, ActionType<?>[] testedActions) {
|
protected Client buildClient(Settings headersSettings, ActionType<?>[] testedActions) {
|
||||||
Settings settings = HEADER_SETTINGS;
|
Settings settings = HEADER_SETTINGS;
|
||||||
TaskManager taskManager = new TaskManager(settings, threadPool, Collections.emptySet());
|
TaskManager taskManager = new TaskManager(settings, threadPool, Collections.emptySet());
|
||||||
Actions actions = new Actions(testedActions, taskManager);
|
Map<ActionType<?>, TransportAction<?, ?>> actions = Stream.of(testedActions)
|
||||||
|
.collect(Collectors.toMap(Function.identity(), a -> new InternalTransportAction(a.name(), taskManager)));
|
||||||
NodeClient client = new NodeClient(settings, threadPool);
|
NodeClient client = new NodeClient(settings, threadPool);
|
||||||
client.initialize(actions, taskManager, () -> "test", mock(Transport.Connection.class), null);
|
client.initialize(actions, taskManager, () -> "test", mock(Transport.Connection.class), null);
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Actions extends HashMap<
|
|
||||||
ActionType<? extends ActionResponse>,
|
|
||||||
TransportAction<? extends ActionRequest, ? extends ActionResponse>> {
|
|
||||||
|
|
||||||
private Actions(ActionType<?>[] actions, TaskManager taskManager) {
|
|
||||||
for (ActionType<?> action : actions) {
|
|
||||||
put(action, new InternalTransportAction(action.name(), taskManager));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class InternalTransportAction extends TransportAction<ActionRequest, ActionResponse> {
|
private static class InternalTransportAction extends TransportAction<ActionRequest, ActionResponse> {
|
||||||
|
|
||||||
private InternalTransportAction(String actionName, TaskManager taskManager) {
|
private InternalTransportAction(String actionName, TaskManager taskManager) {
|
||||||
|
|
|
@ -12,7 +12,6 @@ package org.elasticsearch.indices.cluster;
|
||||||
import org.elasticsearch.ExceptionsHelper;
|
import org.elasticsearch.ExceptionsHelper;
|
||||||
import org.elasticsearch.TransportVersion;
|
import org.elasticsearch.TransportVersion;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
import org.elasticsearch.action.ActionResponse;
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteRequest;
|
import org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteRequest;
|
||||||
|
@ -265,8 +264,7 @@ public class ClusterStateChanges {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
NodeClient client = new NodeClient(Settings.EMPTY, threadPool);
|
NodeClient client = new NodeClient(Settings.EMPTY, threadPool);
|
||||||
Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions =
|
Map<ActionType<?>, TransportAction<?, ?>> actions = new HashMap<>();
|
||||||
new HashMap<>();
|
|
||||||
actions.put(
|
actions.put(
|
||||||
TransportVerifyShardBeforeCloseAction.TYPE,
|
TransportVerifyShardBeforeCloseAction.TYPE,
|
||||||
new TransportVerifyShardBeforeCloseAction(
|
new TransportVerifyShardBeforeCloseAction(
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
package org.elasticsearch.indices.settings;
|
package org.elasticsearch.indices.settings;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionRequestValidationException;
|
import org.elasticsearch.action.ActionRequestValidationException;
|
||||||
import org.elasticsearch.action.ActionResponse;
|
import org.elasticsearch.action.ActionResponse;
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
|
@ -180,9 +179,9 @@ public class InternalOrPrivateSettingsPlugin extends Plugin implements ActionPlu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Collections.singletonList(
|
return Collections.singletonList(
|
||||||
new ActionHandler<>(UpdateInternalOrPrivateAction.INSTANCE, TransportUpdateInternalOrPrivateAction.class)
|
new ActionHandler(UpdateInternalOrPrivateAction.INSTANCE, TransportUpdateInternalOrPrivateAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.TransportVersion;
|
import org.elasticsearch.TransportVersion;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.FailedNodeException;
|
import org.elasticsearch.action.FailedNodeException;
|
||||||
import org.elasticsearch.action.TaskOperationFailure;
|
import org.elasticsearch.action.TaskOperationFailure;
|
||||||
|
@ -87,8 +85,8 @@ public class TestPersistentTasksPlugin extends Plugin implements ActionPlugin, P
|
||||||
);
|
);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Collections.singletonList(new ActionHandler<>(TEST_ACTION, TransportTestTaskAction.class));
|
return Collections.singletonList(new ActionHandler(TEST_ACTION, TransportTestTaskAction.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -79,8 +79,7 @@ public class RestValidateQueryActionTests extends AbstractSearchTestCase {
|
||||||
protected void doExecute(Task task, ActionRequest request, ActionListener<ActionResponse> listener) {}
|
protected void doExecute(Task task, ActionRequest request, ActionListener<ActionResponse> listener) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
final Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions =
|
final Map<ActionType<?>, TransportAction<?, ?>> actions = new HashMap<>();
|
||||||
new HashMap<>();
|
|
||||||
actions.put(ValidateQueryAction.INSTANCE, transportAction);
|
actions.put(ValidateQueryAction.INSTANCE, transportAction);
|
||||||
|
|
||||||
client.initialize(actions, taskManager, () -> "local", mock(Transport.Connection.class), null);
|
client.initialize(actions, taskManager, () -> "local", mock(Transport.Connection.class), null);
|
||||||
|
|
|
@ -13,8 +13,6 @@ import org.apache.logging.log4j.Level;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ExceptionsHelper;
|
import org.elasticsearch.ExceptionsHelper;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionRunnable;
|
import org.elasticsearch.action.ActionRunnable;
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.RequestValidators;
|
import org.elasticsearch.action.RequestValidators;
|
||||||
|
@ -2264,8 +2262,7 @@ public class SnapshotResiliencyTests extends ESTestCase {
|
||||||
threadPool
|
threadPool
|
||||||
);
|
);
|
||||||
nodeConnectionsService = new NodeConnectionsService(clusterService.getSettings(), threadPool, transportService);
|
nodeConnectionsService = new NodeConnectionsService(clusterService.getSettings(), threadPool, transportService);
|
||||||
Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions =
|
Map<ActionType<?>, TransportAction<?, ?>> actions = new HashMap<>();
|
||||||
new HashMap<>();
|
|
||||||
actions.put(
|
actions.put(
|
||||||
GlobalCheckpointSyncAction.TYPE,
|
GlobalCheckpointSyncAction.TYPE,
|
||||||
new GlobalCheckpointSyncAction(
|
new GlobalCheckpointSyncAction(
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
package org.elasticsearch.multiproject;
|
package org.elasticsearch.multiproject;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -80,11 +78,11 @@ public class TestOnlyMultiProjectPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public Collection<ActionHandler> getActions() {
|
||||||
if (multiProjectEnabled) {
|
if (multiProjectEnabled) {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(PutProjectAction.INSTANCE, PutProjectAction.TransportPutProjectAction.class),
|
new ActionHandler(PutProjectAction.INSTANCE, PutProjectAction.TransportPutProjectAction.class),
|
||||||
new ActionHandler<>(DeleteProjectAction.INSTANCE, DeleteProjectAction.TransportDeleteProjectAction.class)
|
new ActionHandler(DeleteProjectAction.INSTANCE, DeleteProjectAction.TransportDeleteProjectAction.class)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return List.of();
|
return List.of();
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class NoOpNodeClient extends NodeClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(
|
public void initialize(
|
||||||
Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions,
|
Map<ActionType<?>, TransportAction<?, ?>> actions,
|
||||||
TaskManager taskManager,
|
TaskManager taskManager,
|
||||||
Supplier<String> localNodeId,
|
Supplier<String> localNodeId,
|
||||||
Transport.Connection localConnection,
|
Transport.Connection localConnection,
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.analytics;
|
package org.elasticsearch.xpack.analytics;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
import org.elasticsearch.common.settings.Setting;
|
import org.elasticsearch.common.settings.Setting;
|
||||||
import org.elasticsearch.index.mapper.Mapper;
|
import org.elasticsearch.index.mapper.Mapper;
|
||||||
|
@ -127,11 +125,11 @@ public class AnalyticsPlugin extends Plugin implements SearchPlugin, ActionPlugi
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionPlugin.ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionPlugin.ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.ANALYTICS, AnalyticsUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.ANALYTICS, AnalyticsUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.ANALYTICS, AnalyticsInfoTransportAction.class),
|
new ActionHandler(XPackInfoFeatureAction.ANALYTICS, AnalyticsInfoTransportAction.class),
|
||||||
new ActionHandler<>(AnalyticsStatsAction.INSTANCE, TransportAnalyticsStatsAction.class)
|
new ActionHandler(AnalyticsStatsAction.INSTANCE, TransportAnalyticsStatsAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.search;
|
package org.elasticsearch.xpack.search;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -36,11 +34,11 @@ import static org.elasticsearch.xpack.core.async.AsyncTaskMaintenanceService.ASY
|
||||||
public final class AsyncSearch extends Plugin implements ActionPlugin {
|
public final class AsyncSearch extends Plugin implements ActionPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(SubmitAsyncSearchAction.INSTANCE, TransportSubmitAsyncSearchAction.class),
|
new ActionHandler(SubmitAsyncSearchAction.INSTANCE, TransportSubmitAsyncSearchAction.class),
|
||||||
new ActionHandler<>(GetAsyncSearchAction.INSTANCE, TransportGetAsyncSearchAction.class),
|
new ActionHandler(GetAsyncSearchAction.INSTANCE, TransportGetAsyncSearchAction.class),
|
||||||
new ActionHandler<>(GetAsyncStatusAction.INSTANCE, TransportGetAsyncStatusAction.class)
|
new ActionHandler(GetAsyncStatusAction.INSTANCE, TransportGetAsyncStatusAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
package org.elasticsearch.xpack.autoscaling;
|
package org.elasticsearch.xpack.autoscaling;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.ClusterState;
|
import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.NamedDiff;
|
import org.elasticsearch.cluster.NamedDiff;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
@ -121,12 +119,12 @@ public class Autoscaling extends Plugin implements ActionPlugin, ExtensiblePlugi
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(GetAutoscalingCapacityAction.INSTANCE, TransportGetAutoscalingCapacityAction.class),
|
new ActionHandler(GetAutoscalingCapacityAction.INSTANCE, TransportGetAutoscalingCapacityAction.class),
|
||||||
new ActionHandler<>(DeleteAutoscalingPolicyAction.INSTANCE, TransportDeleteAutoscalingPolicyAction.class),
|
new ActionHandler(DeleteAutoscalingPolicyAction.INSTANCE, TransportDeleteAutoscalingPolicyAction.class),
|
||||||
new ActionHandler<>(GetAutoscalingPolicyAction.INSTANCE, TransportGetAutoscalingPolicyAction.class),
|
new ActionHandler(GetAutoscalingPolicyAction.INSTANCE, TransportGetAutoscalingPolicyAction.class),
|
||||||
new ActionHandler<>(PutAutoscalingPolicyAction.INSTANCE, TransportPutAutoscalingPolicyAction.class)
|
new ActionHandler(PutAutoscalingPolicyAction.INSTANCE, TransportPutAutoscalingPolicyAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@ package org.elasticsearch.xpack.ccr;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.TransportVersion;
|
import org.elasticsearch.TransportVersion;
|
||||||
import org.elasticsearch.TransportVersions;
|
import org.elasticsearch.TransportVersions;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.RequestValidators;
|
import org.elasticsearch.action.RequestValidators;
|
||||||
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
|
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
|
||||||
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
|
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
|
||||||
|
@ -211,47 +209,47 @@ public class Ccr extends Plugin implements ActionPlugin, PersistentTaskPlugin, E
|
||||||
return Collections.singletonList(new ShardFollowTasksExecutor(client, threadPool, clusterService, settingsModule));
|
return Collections.singletonList(new ShardFollowTasksExecutor(client, threadPool, clusterService, settingsModule));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.CCR, CCRUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.CCR, CCRUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.CCR, CCRInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.CCR, CCRInfoTransportAction.class);
|
||||||
if (enabled == false) {
|
if (enabled == false) {
|
||||||
return Arrays.asList(usageAction, infoAction);
|
return Arrays.asList(usageAction, infoAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
// internal actions
|
// internal actions
|
||||||
new ActionHandler<>(BulkShardOperationsAction.INSTANCE, TransportBulkShardOperationsAction.class),
|
new ActionHandler(BulkShardOperationsAction.INSTANCE, TransportBulkShardOperationsAction.class),
|
||||||
new ActionHandler<>(ShardChangesAction.INSTANCE, ShardChangesAction.TransportAction.class),
|
new ActionHandler(ShardChangesAction.INSTANCE, ShardChangesAction.TransportAction.class),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
PutInternalCcrRepositoryAction.INSTANCE,
|
PutInternalCcrRepositoryAction.INSTANCE,
|
||||||
PutInternalCcrRepositoryAction.TransportPutInternalRepositoryAction.class
|
PutInternalCcrRepositoryAction.TransportPutInternalRepositoryAction.class
|
||||||
),
|
),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
DeleteInternalCcrRepositoryAction.INSTANCE,
|
DeleteInternalCcrRepositoryAction.INSTANCE,
|
||||||
DeleteInternalCcrRepositoryAction.TransportDeleteInternalRepositoryAction.class
|
DeleteInternalCcrRepositoryAction.TransportDeleteInternalRepositoryAction.class
|
||||||
),
|
),
|
||||||
new ActionHandler<>(PutCcrRestoreSessionAction.INTERNAL_INSTANCE, PutCcrRestoreSessionAction.InternalTransportAction.class),
|
new ActionHandler(PutCcrRestoreSessionAction.INTERNAL_INSTANCE, PutCcrRestoreSessionAction.InternalTransportAction.class),
|
||||||
new ActionHandler<>(PutCcrRestoreSessionAction.INSTANCE, PutCcrRestoreSessionAction.TransportAction.class),
|
new ActionHandler(PutCcrRestoreSessionAction.INSTANCE, PutCcrRestoreSessionAction.TransportAction.class),
|
||||||
new ActionHandler<>(ClearCcrRestoreSessionAction.INTERNAL_INSTANCE, ClearCcrRestoreSessionAction.InternalTransportAction.class),
|
new ActionHandler(ClearCcrRestoreSessionAction.INTERNAL_INSTANCE, ClearCcrRestoreSessionAction.InternalTransportAction.class),
|
||||||
new ActionHandler<>(ClearCcrRestoreSessionAction.INSTANCE, ClearCcrRestoreSessionAction.TransportAction.class),
|
new ActionHandler(ClearCcrRestoreSessionAction.INSTANCE, ClearCcrRestoreSessionAction.TransportAction.class),
|
||||||
new ActionHandler<>(GetCcrRestoreFileChunkAction.INTERNAL_INSTANCE, GetCcrRestoreFileChunkAction.InternalTransportAction.class),
|
new ActionHandler(GetCcrRestoreFileChunkAction.INTERNAL_INSTANCE, GetCcrRestoreFileChunkAction.InternalTransportAction.class),
|
||||||
new ActionHandler<>(GetCcrRestoreFileChunkAction.INSTANCE, GetCcrRestoreFileChunkAction.TransportAction.class),
|
new ActionHandler(GetCcrRestoreFileChunkAction.INSTANCE, GetCcrRestoreFileChunkAction.TransportAction.class),
|
||||||
// stats action
|
// stats action
|
||||||
new ActionHandler<>(FollowStatsAction.INSTANCE, TransportFollowStatsAction.class),
|
new ActionHandler(FollowStatsAction.INSTANCE, TransportFollowStatsAction.class),
|
||||||
new ActionHandler<>(CcrStatsAction.INSTANCE, TransportCcrStatsAction.class),
|
new ActionHandler(CcrStatsAction.INSTANCE, TransportCcrStatsAction.class),
|
||||||
new ActionHandler<>(FollowInfoAction.INSTANCE, TransportFollowInfoAction.class),
|
new ActionHandler(FollowInfoAction.INSTANCE, TransportFollowInfoAction.class),
|
||||||
// follow actions
|
// follow actions
|
||||||
new ActionHandler<>(PutFollowAction.INSTANCE, TransportPutFollowAction.class),
|
new ActionHandler(PutFollowAction.INSTANCE, TransportPutFollowAction.class),
|
||||||
new ActionHandler<>(ResumeFollowAction.INSTANCE, TransportResumeFollowAction.class),
|
new ActionHandler(ResumeFollowAction.INSTANCE, TransportResumeFollowAction.class),
|
||||||
new ActionHandler<>(PauseFollowAction.INSTANCE, TransportPauseFollowAction.class),
|
new ActionHandler(PauseFollowAction.INSTANCE, TransportPauseFollowAction.class),
|
||||||
new ActionHandler<>(UnfollowAction.INSTANCE, TransportUnfollowAction.class),
|
new ActionHandler(UnfollowAction.INSTANCE, TransportUnfollowAction.class),
|
||||||
// auto-follow actions
|
// auto-follow actions
|
||||||
new ActionHandler<>(DeleteAutoFollowPatternAction.INSTANCE, TransportDeleteAutoFollowPatternAction.class),
|
new ActionHandler(DeleteAutoFollowPatternAction.INSTANCE, TransportDeleteAutoFollowPatternAction.class),
|
||||||
new ActionHandler<>(PutAutoFollowPatternAction.INSTANCE, TransportPutAutoFollowPatternAction.class),
|
new ActionHandler(PutAutoFollowPatternAction.INSTANCE, TransportPutAutoFollowPatternAction.class),
|
||||||
new ActionHandler<>(GetAutoFollowPatternAction.INSTANCE, TransportGetAutoFollowPatternAction.class),
|
new ActionHandler(GetAutoFollowPatternAction.INSTANCE, TransportGetAutoFollowPatternAction.class),
|
||||||
new ActionHandler<>(ActivateAutoFollowPatternAction.INSTANCE, TransportActivateAutoFollowPatternAction.class),
|
new ActionHandler(ActivateAutoFollowPatternAction.INSTANCE, TransportActivateAutoFollowPatternAction.class),
|
||||||
// forget follower action
|
// forget follower action
|
||||||
new ActionHandler<>(ForgetFollowerAction.INSTANCE, TransportForgetFollowerAction.class),
|
new ActionHandler(ForgetFollowerAction.INSTANCE, TransportForgetFollowerAction.class),
|
||||||
usageAction,
|
usageAction,
|
||||||
infoAction
|
infoAction
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.core.action;
|
package org.elasticsearch.xpack.core.action;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.support.PlainActionFuture;
|
import org.elasticsearch.action.support.PlainActionFuture;
|
||||||
import org.elasticsearch.cluster.ClusterState;
|
import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||||
|
@ -289,9 +287,9 @@ public class DataStreamLifecycleUsageTransportActionIT extends ESIntegTestCase {
|
||||||
*/
|
*/
|
||||||
public static final class TestDateLifecycleUsagePlugin extends XPackClientPlugin {
|
public static final class TestDateLifecycleUsagePlugin extends XPackClientPlugin {
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionPlugin.ActionHandler<>(DATA_STREAM_LIFECYCLE, DataStreamLifecycleUsageTransportAction.class));
|
actions.add(new ActionPlugin.ActionHandler(DATA_STREAM_LIFECYCLE, DataStreamLifecycleUsageTransportAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,6 @@ package org.elasticsearch.xpack.core.rest.action;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.http.client.methods.HttpGet;
|
||||||
import org.elasticsearch.TransportVersion;
|
import org.elasticsearch.TransportVersion;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.PlainActionFuture;
|
import org.elasticsearch.action.support.PlainActionFuture;
|
||||||
|
@ -112,10 +110,10 @@ public class XPackUsageRestCancellationIT extends ESIntegTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
final ArrayList<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>(super.getActions());
|
final ArrayList<ActionHandler> actions = new ArrayList<>(super.getActions());
|
||||||
actions.add(new ActionHandler<>(BLOCKING_XPACK_USAGE, BlockingXPackUsageAction.class));
|
actions.add(new ActionHandler(BLOCKING_XPACK_USAGE, BlockingXPackUsageAction.class));
|
||||||
actions.add(new ActionHandler<>(NON_BLOCKING_XPACK_USAGE, NonBlockingXPackUsageAction.class));
|
actions.add(new ActionHandler(NON_BLOCKING_XPACK_USAGE, NonBlockingXPackUsageAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,6 @@ import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.SpecialPermission;
|
import org.elasticsearch.SpecialPermission;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.support.TransportAction;
|
import org.elasticsearch.action.support.TransportAction;
|
||||||
import org.elasticsearch.cluster.ClusterState;
|
import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
@ -353,28 +351,28 @@ public class XPackPlugin extends XPackClientPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionHandler<>(XPackInfoAction.INSTANCE, getInfoAction()));
|
actions.add(new ActionHandler(XPackInfoAction.INSTANCE, getInfoAction()));
|
||||||
actions.add(new ActionHandler<>(XPackUsageAction.INSTANCE, getUsageAction()));
|
actions.add(new ActionHandler(XPackUsageAction.INSTANCE, getUsageAction()));
|
||||||
actions.add(new ActionHandler<>(PutLicenseAction.INSTANCE, TransportPutLicenseAction.class));
|
actions.add(new ActionHandler(PutLicenseAction.INSTANCE, TransportPutLicenseAction.class));
|
||||||
actions.add(new ActionHandler<>(GetLicenseAction.INSTANCE, TransportGetLicenseAction.class));
|
actions.add(new ActionHandler(GetLicenseAction.INSTANCE, TransportGetLicenseAction.class));
|
||||||
actions.add(new ActionHandler<>(TransportDeleteLicenseAction.TYPE, TransportDeleteLicenseAction.class));
|
actions.add(new ActionHandler(TransportDeleteLicenseAction.TYPE, TransportDeleteLicenseAction.class));
|
||||||
actions.add(new ActionHandler<>(PostStartTrialAction.INSTANCE, TransportPostStartTrialAction.class));
|
actions.add(new ActionHandler(PostStartTrialAction.INSTANCE, TransportPostStartTrialAction.class));
|
||||||
actions.add(new ActionHandler<>(GetTrialStatusAction.INSTANCE, TransportGetTrialStatusAction.class));
|
actions.add(new ActionHandler(GetTrialStatusAction.INSTANCE, TransportGetTrialStatusAction.class));
|
||||||
actions.add(new ActionHandler<>(PostStartBasicAction.INSTANCE, TransportPostStartBasicAction.class));
|
actions.add(new ActionHandler(PostStartBasicAction.INSTANCE, TransportPostStartBasicAction.class));
|
||||||
actions.add(new ActionHandler<>(GetBasicStatusAction.INSTANCE, TransportGetBasicStatusAction.class));
|
actions.add(new ActionHandler(GetBasicStatusAction.INSTANCE, TransportGetBasicStatusAction.class));
|
||||||
actions.add(new ActionHandler<>(TransportGetFeatureUsageAction.TYPE, TransportGetFeatureUsageAction.class));
|
actions.add(new ActionHandler(TransportGetFeatureUsageAction.TYPE, TransportGetFeatureUsageAction.class));
|
||||||
actions.add(new ActionHandler<>(TermsEnumAction.INSTANCE, TransportTermsEnumAction.class));
|
actions.add(new ActionHandler(TermsEnumAction.INSTANCE, TransportTermsEnumAction.class));
|
||||||
actions.add(new ActionHandler<>(TransportDeleteAsyncResultAction.TYPE, TransportDeleteAsyncResultAction.class));
|
actions.add(new ActionHandler(TransportDeleteAsyncResultAction.TYPE, TransportDeleteAsyncResultAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackInfoFeatureAction.DATA_TIERS, DataTiersInfoTransportAction.class));
|
actions.add(new ActionHandler(XPackInfoFeatureAction.DATA_TIERS, DataTiersInfoTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackUsageFeatureAction.DATA_TIERS, DataTiersUsageTransportAction.class));
|
actions.add(new ActionHandler(XPackUsageFeatureAction.DATA_TIERS, DataTiersUsageTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackUsageFeatureAction.DATA_STREAMS, DataStreamUsageTransportAction.class));
|
actions.add(new ActionHandler(XPackUsageFeatureAction.DATA_STREAMS, DataStreamUsageTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackInfoFeatureAction.DATA_STREAMS, DataStreamInfoTransportAction.class));
|
actions.add(new ActionHandler(XPackInfoFeatureAction.DATA_STREAMS, DataStreamInfoTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackUsageFeatureAction.DATA_STREAM_LIFECYCLE, DataStreamLifecycleUsageTransportAction.class));
|
actions.add(new ActionHandler(XPackUsageFeatureAction.DATA_STREAM_LIFECYCLE, DataStreamLifecycleUsageTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackUsageFeatureAction.HEALTH, HealthApiUsageTransportAction.class));
|
actions.add(new ActionHandler(XPackUsageFeatureAction.HEALTH, HealthApiUsageTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(XPackUsageFeatureAction.REMOTE_CLUSTERS, RemoteClusterUsageTransportAction.class));
|
actions.add(new ActionHandler(XPackUsageFeatureAction.REMOTE_CLUSTERS, RemoteClusterUsageTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(NodesDataTiersUsageTransportAction.TYPE, NodesDataTiersUsageTransportAction.class));
|
actions.add(new ActionHandler(NodesDataTiersUsageTransportAction.TYPE, NodesDataTiersUsageTransportAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.core;
|
package org.elasticsearch.xpack.core;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.RequestValidators;
|
import org.elasticsearch.action.RequestValidators;
|
||||||
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse;
|
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse;
|
||||||
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse.ResetFeatureStateStatus;
|
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse.ResetFeatureStateStatus;
|
||||||
|
@ -220,8 +218,8 @@ public class LocalStateCompositeXPackPlugin extends XPackPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>(super.getActions());
|
List<ActionHandler> actions = new ArrayList<>(super.getActions());
|
||||||
filterPlugins(ActionPlugin.class).forEach(p -> actions.addAll(p.getActions()));
|
filterPlugins(ActionPlugin.class).forEach(p -> actions.addAll(p.getActions()));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,8 +79,7 @@ public class RestTermsEnumActionTests extends ESTestCase {
|
||||||
protected void doExecute(Task task, ActionRequest request, ActionListener<ActionResponse> listener) {}
|
protected void doExecute(Task task, ActionRequest request, ActionListener<ActionResponse> listener) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
final Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions =
|
final Map<ActionType<?>, TransportAction<?, ?>> actions = new HashMap<>();
|
||||||
new HashMap<>();
|
|
||||||
actions.put(TermsEnumAction.INSTANCE, transportAction);
|
actions.put(TermsEnumAction.INSTANCE, transportAction);
|
||||||
|
|
||||||
client.initialize(actions, taskManager, () -> "local", mock(Transport.Connection.class), null);
|
client.initialize(actions, taskManager, () -> "local", mock(Transport.Connection.class), null);
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.deprecation;
|
package org.elasticsearch.xpack.deprecation;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -56,11 +54,11 @@ public class Deprecation extends Plugin implements ActionPlugin {
|
||||||
);
|
);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(DeprecationInfoAction.INSTANCE, TransportDeprecationInfoAction.class),
|
new ActionHandler(DeprecationInfoAction.INSTANCE, TransportDeprecationInfoAction.class),
|
||||||
new ActionHandler<>(NodesDeprecationCheckAction.INSTANCE, TransportNodeDeprecationCheckAction.class),
|
new ActionHandler(NodesDeprecationCheckAction.INSTANCE, TransportNodeDeprecationCheckAction.class),
|
||||||
new ActionHandler<>(DeprecationCacheResetAction.INSTANCE, TransportDeprecationCacheResetAction.class)
|
new ActionHandler(DeprecationCacheResetAction.INSTANCE, TransportDeprecationCacheResetAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.downsample;
|
package org.elasticsearch.xpack.downsample;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.downsample.DownsampleAction;
|
import org.elasticsearch.action.downsample.DownsampleAction;
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
@ -63,10 +61,10 @@ public class Downsample extends Plugin implements ActionPlugin, PersistentTaskPl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(DownsampleAction.INSTANCE, TransportDownsampleAction.class),
|
new ActionHandler(DownsampleAction.INSTANCE, TransportDownsampleAction.class),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
DownsampleShardPersistentTaskExecutor.DelegatingAction.INSTANCE,
|
DownsampleShardPersistentTaskExecutor.DelegatingAction.INSTANCE,
|
||||||
DownsampleShardPersistentTaskExecutor.DelegatingAction.TA.class
|
DownsampleShardPersistentTaskExecutor.DelegatingAction.TA.class
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.enrich;
|
package org.elasticsearch.xpack.enrich;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.NamedDiff;
|
import org.elasticsearch.cluster.NamedDiff;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.metadata.Metadata;
|
import org.elasticsearch.cluster.metadata.Metadata;
|
||||||
|
@ -211,20 +209,20 @@ public class EnrichPlugin extends Plugin implements SystemIndexPlugin, IngestPlu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.ENRICH, EnrichInfoTransportAction.class),
|
new ActionHandler(XPackInfoFeatureAction.ENRICH, EnrichInfoTransportAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.ENRICH, EnrichUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.ENRICH, EnrichUsageTransportAction.class),
|
||||||
new ActionHandler<>(GetEnrichPolicyAction.INSTANCE, TransportGetEnrichPolicyAction.class),
|
new ActionHandler(GetEnrichPolicyAction.INSTANCE, TransportGetEnrichPolicyAction.class),
|
||||||
new ActionHandler<>(DeleteEnrichPolicyAction.INSTANCE, TransportDeleteEnrichPolicyAction.class),
|
new ActionHandler(DeleteEnrichPolicyAction.INSTANCE, TransportDeleteEnrichPolicyAction.class),
|
||||||
new ActionHandler<>(PutEnrichPolicyAction.INSTANCE, TransportPutEnrichPolicyAction.class),
|
new ActionHandler(PutEnrichPolicyAction.INSTANCE, TransportPutEnrichPolicyAction.class),
|
||||||
new ActionHandler<>(ExecuteEnrichPolicyAction.INSTANCE, TransportExecuteEnrichPolicyAction.class),
|
new ActionHandler(ExecuteEnrichPolicyAction.INSTANCE, TransportExecuteEnrichPolicyAction.class),
|
||||||
new ActionHandler<>(EnrichStatsAction.INSTANCE, TransportEnrichStatsAction.class),
|
new ActionHandler(EnrichStatsAction.INSTANCE, TransportEnrichStatsAction.class),
|
||||||
new ActionHandler<>(EnrichCoordinatorProxyAction.INSTANCE, EnrichCoordinatorProxyAction.TransportAction.class),
|
new ActionHandler(EnrichCoordinatorProxyAction.INSTANCE, EnrichCoordinatorProxyAction.TransportAction.class),
|
||||||
new ActionHandler<>(EnrichShardMultiSearchAction.INSTANCE, EnrichShardMultiSearchAction.TransportAction.class),
|
new ActionHandler(EnrichShardMultiSearchAction.INSTANCE, EnrichShardMultiSearchAction.TransportAction.class),
|
||||||
new ActionHandler<>(EnrichCoordinatorStatsAction.INSTANCE, EnrichCoordinatorStatsAction.TransportAction.class),
|
new ActionHandler(EnrichCoordinatorStatsAction.INSTANCE, EnrichCoordinatorStatsAction.TransportAction.class),
|
||||||
new ActionHandler<>(EnrichReindexAction.INSTANCE, TransportEnrichReindexAction.class),
|
new ActionHandler(EnrichReindexAction.INSTANCE, TransportEnrichReindexAction.class),
|
||||||
new ActionHandler<>(InternalExecutePolicyAction.INSTANCE, InternalExecutePolicyAction.Transport.class)
|
new ActionHandler(InternalExecutePolicyAction.INSTANCE, InternalExecutePolicyAction.Transport.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.application;
|
package org.elasticsearch.xpack.application;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -261,38 +259,38 @@ public class EnterpriseSearch extends Plugin implements ActionPlugin, SystemInde
|
||||||
public static final TimeValue HARD_CODED_ENTERPRISE_SEARCH_MASTER_NODE_TIMEOUT = TimeValue.THIRTY_SECONDS;
|
public static final TimeValue HARD_CODED_ENTERPRISE_SEARCH_MASTER_NODE_TIMEOUT = TimeValue.THIRTY_SECONDS;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.ENTERPRISE_SEARCH, EnterpriseSearchUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.ENTERPRISE_SEARCH, EnterpriseSearchUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.ENTERPRISE_SEARCH, EnterpriseSearchInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.ENTERPRISE_SEARCH, EnterpriseSearchInfoTransportAction.class);
|
||||||
if (enabled == false) {
|
if (enabled == false) {
|
||||||
return List.of(usageAction, infoAction);
|
return List.of(usageAction, infoAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actionHandlers = new ArrayList<>(
|
List<ActionHandler> actionHandlers = new ArrayList<>(
|
||||||
List.of(
|
List.of(
|
||||||
// Behavioral Analytics
|
// Behavioral Analytics
|
||||||
new ActionHandler<>(PutAnalyticsCollectionAction.INSTANCE, TransportPutAnalyticsCollectionAction.class),
|
new ActionHandler(PutAnalyticsCollectionAction.INSTANCE, TransportPutAnalyticsCollectionAction.class),
|
||||||
new ActionHandler<>(GetAnalyticsCollectionAction.INSTANCE, TransportGetAnalyticsCollectionAction.class),
|
new ActionHandler(GetAnalyticsCollectionAction.INSTANCE, TransportGetAnalyticsCollectionAction.class),
|
||||||
new ActionHandler<>(DeleteAnalyticsCollectionAction.INSTANCE, TransportDeleteAnalyticsCollectionAction.class),
|
new ActionHandler(DeleteAnalyticsCollectionAction.INSTANCE, TransportDeleteAnalyticsCollectionAction.class),
|
||||||
new ActionHandler<>(PostAnalyticsEventAction.INSTANCE, TransportPostAnalyticsEventAction.class),
|
new ActionHandler(PostAnalyticsEventAction.INSTANCE, TransportPostAnalyticsEventAction.class),
|
||||||
|
|
||||||
// Search Applications
|
// Search Applications
|
||||||
new ActionHandler<>(DeleteSearchApplicationAction.INSTANCE, TransportDeleteSearchApplicationAction.class),
|
new ActionHandler(DeleteSearchApplicationAction.INSTANCE, TransportDeleteSearchApplicationAction.class),
|
||||||
new ActionHandler<>(GetSearchApplicationAction.INSTANCE, TransportGetSearchApplicationAction.class),
|
new ActionHandler(GetSearchApplicationAction.INSTANCE, TransportGetSearchApplicationAction.class),
|
||||||
new ActionHandler<>(ListSearchApplicationAction.INSTANCE, TransportListSearchApplicationAction.class),
|
new ActionHandler(ListSearchApplicationAction.INSTANCE, TransportListSearchApplicationAction.class),
|
||||||
new ActionHandler<>(PutSearchApplicationAction.INSTANCE, TransportPutSearchApplicationAction.class),
|
new ActionHandler(PutSearchApplicationAction.INSTANCE, TransportPutSearchApplicationAction.class),
|
||||||
new ActionHandler<>(QuerySearchApplicationAction.INSTANCE, TransportQuerySearchApplicationAction.class),
|
new ActionHandler(QuerySearchApplicationAction.INSTANCE, TransportQuerySearchApplicationAction.class),
|
||||||
new ActionHandler<>(RenderSearchApplicationQueryAction.INSTANCE, TransportRenderSearchApplicationQueryAction.class),
|
new ActionHandler(RenderSearchApplicationQueryAction.INSTANCE, TransportRenderSearchApplicationQueryAction.class),
|
||||||
|
|
||||||
// Query rules
|
// Query rules
|
||||||
new ActionHandler<>(DeleteQueryRulesetAction.INSTANCE, TransportDeleteQueryRulesetAction.class),
|
new ActionHandler(DeleteQueryRulesetAction.INSTANCE, TransportDeleteQueryRulesetAction.class),
|
||||||
new ActionHandler<>(GetQueryRulesetAction.INSTANCE, TransportGetQueryRulesetAction.class),
|
new ActionHandler(GetQueryRulesetAction.INSTANCE, TransportGetQueryRulesetAction.class),
|
||||||
new ActionHandler<>(ListQueryRulesetsAction.INSTANCE, TransportListQueryRulesetsAction.class),
|
new ActionHandler(ListQueryRulesetsAction.INSTANCE, TransportListQueryRulesetsAction.class),
|
||||||
new ActionHandler<>(PutQueryRulesetAction.INSTANCE, TransportPutQueryRulesetAction.class),
|
new ActionHandler(PutQueryRulesetAction.INSTANCE, TransportPutQueryRulesetAction.class),
|
||||||
new ActionHandler<>(DeleteQueryRuleAction.INSTANCE, TransportDeleteQueryRuleAction.class),
|
new ActionHandler(DeleteQueryRuleAction.INSTANCE, TransportDeleteQueryRuleAction.class),
|
||||||
new ActionHandler<>(GetQueryRuleAction.INSTANCE, TransportGetQueryRuleAction.class),
|
new ActionHandler(GetQueryRuleAction.INSTANCE, TransportGetQueryRuleAction.class),
|
||||||
new ActionHandler<>(PutQueryRuleAction.INSTANCE, TransportPutQueryRuleAction.class),
|
new ActionHandler(PutQueryRuleAction.INSTANCE, TransportPutQueryRuleAction.class),
|
||||||
new ActionHandler<>(TestQueryRulesetAction.INSTANCE, TransportTestQueryRulesetAction.class),
|
new ActionHandler(TestQueryRulesetAction.INSTANCE, TransportTestQueryRulesetAction.class),
|
||||||
|
|
||||||
usageAction,
|
usageAction,
|
||||||
infoAction
|
infoAction
|
||||||
|
@ -304,44 +302,44 @@ public class EnterpriseSearch extends Plugin implements ActionPlugin, SystemInde
|
||||||
actionHandlers.addAll(
|
actionHandlers.addAll(
|
||||||
List.of(
|
List.of(
|
||||||
// Connectors API
|
// Connectors API
|
||||||
new ActionHandler<>(DeleteConnectorAction.INSTANCE, TransportDeleteConnectorAction.class),
|
new ActionHandler(DeleteConnectorAction.INSTANCE, TransportDeleteConnectorAction.class),
|
||||||
new ActionHandler<>(GetConnectorAction.INSTANCE, TransportGetConnectorAction.class),
|
new ActionHandler(GetConnectorAction.INSTANCE, TransportGetConnectorAction.class),
|
||||||
new ActionHandler<>(ListConnectorAction.INSTANCE, TransportListConnectorAction.class),
|
new ActionHandler(ListConnectorAction.INSTANCE, TransportListConnectorAction.class),
|
||||||
new ActionHandler<>(PostConnectorAction.INSTANCE, TransportPostConnectorAction.class),
|
new ActionHandler(PostConnectorAction.INSTANCE, TransportPostConnectorAction.class),
|
||||||
new ActionHandler<>(PutConnectorAction.INSTANCE, TransportPutConnectorAction.class),
|
new ActionHandler(PutConnectorAction.INSTANCE, TransportPutConnectorAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorApiKeyIdAction.INSTANCE, TransportUpdateConnectorApiKeyIdAction.class),
|
new ActionHandler(UpdateConnectorApiKeyIdAction.INSTANCE, TransportUpdateConnectorApiKeyIdAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorConfigurationAction.INSTANCE, TransportUpdateConnectorConfigurationAction.class),
|
new ActionHandler(UpdateConnectorConfigurationAction.INSTANCE, TransportUpdateConnectorConfigurationAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorErrorAction.INSTANCE, TransportUpdateConnectorErrorAction.class),
|
new ActionHandler(UpdateConnectorErrorAction.INSTANCE, TransportUpdateConnectorErrorAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorFeaturesAction.INSTANCE, TransportUpdateConnectorFeaturesAction.class),
|
new ActionHandler(UpdateConnectorFeaturesAction.INSTANCE, TransportUpdateConnectorFeaturesAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorFilteringAction.INSTANCE, TransportUpdateConnectorFilteringAction.class),
|
new ActionHandler(UpdateConnectorFilteringAction.INSTANCE, TransportUpdateConnectorFilteringAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorActiveFilteringAction.INSTANCE, TransportUpdateConnectorActiveFilteringAction.class),
|
new ActionHandler(UpdateConnectorActiveFilteringAction.INSTANCE, TransportUpdateConnectorActiveFilteringAction.class),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
UpdateConnectorFilteringValidationAction.INSTANCE,
|
UpdateConnectorFilteringValidationAction.INSTANCE,
|
||||||
TransportUpdateConnectorFilteringValidationAction.class
|
TransportUpdateConnectorFilteringValidationAction.class
|
||||||
),
|
),
|
||||||
new ActionHandler<>(UpdateConnectorIndexNameAction.INSTANCE, TransportUpdateConnectorIndexNameAction.class),
|
new ActionHandler(UpdateConnectorIndexNameAction.INSTANCE, TransportUpdateConnectorIndexNameAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorLastSeenAction.INSTANCE, TransportUpdateConnectorLastSeenAction.class),
|
new ActionHandler(UpdateConnectorLastSeenAction.INSTANCE, TransportUpdateConnectorLastSeenAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorLastSyncStatsAction.INSTANCE, TransportUpdateConnectorLastSyncStatsAction.class),
|
new ActionHandler(UpdateConnectorLastSyncStatsAction.INSTANCE, TransportUpdateConnectorLastSyncStatsAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorNameAction.INSTANCE, TransportUpdateConnectorNameAction.class),
|
new ActionHandler(UpdateConnectorNameAction.INSTANCE, TransportUpdateConnectorNameAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorNativeAction.INSTANCE, TransportUpdateConnectorNativeAction.class),
|
new ActionHandler(UpdateConnectorNativeAction.INSTANCE, TransportUpdateConnectorNativeAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorPipelineAction.INSTANCE, TransportUpdateConnectorPipelineAction.class),
|
new ActionHandler(UpdateConnectorPipelineAction.INSTANCE, TransportUpdateConnectorPipelineAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorSchedulingAction.INSTANCE, TransportUpdateConnectorSchedulingAction.class),
|
new ActionHandler(UpdateConnectorSchedulingAction.INSTANCE, TransportUpdateConnectorSchedulingAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorServiceTypeAction.INSTANCE, TransportUpdateConnectorServiceTypeAction.class),
|
new ActionHandler(UpdateConnectorServiceTypeAction.INSTANCE, TransportUpdateConnectorServiceTypeAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorStatusAction.INSTANCE, TransportUpdateConnectorStatusAction.class),
|
new ActionHandler(UpdateConnectorStatusAction.INSTANCE, TransportUpdateConnectorStatusAction.class),
|
||||||
|
|
||||||
// SyncJob API
|
// SyncJob API
|
||||||
new ActionHandler<>(GetConnectorSyncJobAction.INSTANCE, TransportGetConnectorSyncJobAction.class),
|
new ActionHandler(GetConnectorSyncJobAction.INSTANCE, TransportGetConnectorSyncJobAction.class),
|
||||||
new ActionHandler<>(PostConnectorSyncJobAction.INSTANCE, TransportPostConnectorSyncJobAction.class),
|
new ActionHandler(PostConnectorSyncJobAction.INSTANCE, TransportPostConnectorSyncJobAction.class),
|
||||||
new ActionHandler<>(DeleteConnectorSyncJobAction.INSTANCE, TransportDeleteConnectorSyncJobAction.class),
|
new ActionHandler(DeleteConnectorSyncJobAction.INSTANCE, TransportDeleteConnectorSyncJobAction.class),
|
||||||
new ActionHandler<>(CheckInConnectorSyncJobAction.INSTANCE, TransportCheckInConnectorSyncJobAction.class),
|
new ActionHandler(CheckInConnectorSyncJobAction.INSTANCE, TransportCheckInConnectorSyncJobAction.class),
|
||||||
new ActionHandler<>(CancelConnectorSyncJobAction.INSTANCE, TransportCancelConnectorSyncJobAction.class),
|
new ActionHandler(CancelConnectorSyncJobAction.INSTANCE, TransportCancelConnectorSyncJobAction.class),
|
||||||
new ActionHandler<>(ListConnectorSyncJobsAction.INSTANCE, TransportListConnectorSyncJobsAction.class),
|
new ActionHandler(ListConnectorSyncJobsAction.INSTANCE, TransportListConnectorSyncJobsAction.class),
|
||||||
new ActionHandler<>(UpdateConnectorSyncJobErrorAction.INSTANCE, TransportUpdateConnectorSyncJobErrorAction.class),
|
new ActionHandler(UpdateConnectorSyncJobErrorAction.INSTANCE, TransportUpdateConnectorSyncJobErrorAction.class),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
UpdateConnectorSyncJobIngestionStatsAction.INSTANCE,
|
UpdateConnectorSyncJobIngestionStatsAction.INSTANCE,
|
||||||
TransportUpdateConnectorSyncJobIngestionStatsAction.class
|
TransportUpdateConnectorSyncJobIngestionStatsAction.class
|
||||||
),
|
),
|
||||||
new ActionHandler<>(ClaimConnectorSyncJobAction.INSTANCE, TransportClaimConnectorSyncJobAction.class)
|
new ActionHandler(ClaimConnectorSyncJobAction.INSTANCE, TransportClaimConnectorSyncJobAction.class)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -349,10 +347,10 @@ public class EnterpriseSearch extends Plugin implements ActionPlugin, SystemInde
|
||||||
if (ConnectorSecretsFeature.isEnabled()) {
|
if (ConnectorSecretsFeature.isEnabled()) {
|
||||||
actionHandlers.addAll(
|
actionHandlers.addAll(
|
||||||
List.of(
|
List.of(
|
||||||
new ActionHandler<>(DeleteConnectorSecretAction.INSTANCE, TransportDeleteConnectorSecretAction.class),
|
new ActionHandler(DeleteConnectorSecretAction.INSTANCE, TransportDeleteConnectorSecretAction.class),
|
||||||
new ActionHandler<>(GetConnectorSecretAction.INSTANCE, TransportGetConnectorSecretAction.class),
|
new ActionHandler(GetConnectorSecretAction.INSTANCE, TransportGetConnectorSecretAction.class),
|
||||||
new ActionHandler<>(PostConnectorSecretAction.INSTANCE, TransportPostConnectorSecretAction.class),
|
new ActionHandler(PostConnectorSecretAction.INSTANCE, TransportPostConnectorSecretAction.class),
|
||||||
new ActionHandler<>(PutConnectorSecretAction.INSTANCE, TransportPutConnectorSecretAction.class)
|
new ActionHandler(PutConnectorSecretAction.INSTANCE, TransportPutConnectorSecretAction.class)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.application;
|
package org.elasticsearch.xpack.application;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -66,7 +64,7 @@ public class LocalStateEnterpriseSearch extends LocalStateCompositeXPackPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return entSearchPlugin.getActions();
|
return entSearchPlugin.getActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.eql.plugin;
|
package org.elasticsearch.xpack.eql.plugin;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -104,14 +102,14 @@ public class EqlPlugin extends Plugin implements ActionPlugin, CircuitBreakerPlu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(EqlSearchAction.INSTANCE, TransportEqlSearchAction.class),
|
new ActionHandler(EqlSearchAction.INSTANCE, TransportEqlSearchAction.class),
|
||||||
new ActionHandler<>(EqlStatsAction.INSTANCE, TransportEqlStatsAction.class),
|
new ActionHandler(EqlStatsAction.INSTANCE, TransportEqlStatsAction.class),
|
||||||
new ActionHandler<>(EqlAsyncGetResultAction.INSTANCE, TransportEqlAsyncGetResultsAction.class),
|
new ActionHandler(EqlAsyncGetResultAction.INSTANCE, TransportEqlAsyncGetResultsAction.class),
|
||||||
new ActionHandler<>(EqlAsyncGetStatusAction.INSTANCE, TransportEqlAsyncGetStatusAction.class),
|
new ActionHandler(EqlAsyncGetStatusAction.INSTANCE, TransportEqlAsyncGetStatusAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.EQL, EqlUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.EQL, EqlUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.EQL, EqlInfoTransportAction.class)
|
new ActionHandler(XPackInfoFeatureAction.EQL, EqlInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.esql.plugin;
|
package org.elasticsearch.xpack.esql.plugin;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||||
|
@ -220,16 +218,16 @@ public class EsqlPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(EsqlQueryAction.INSTANCE, TransportEsqlQueryAction.class),
|
new ActionHandler(EsqlQueryAction.INSTANCE, TransportEsqlQueryAction.class),
|
||||||
new ActionHandler<>(EsqlAsyncGetResultAction.INSTANCE, TransportEsqlAsyncGetResultsAction.class),
|
new ActionHandler(EsqlAsyncGetResultAction.INSTANCE, TransportEsqlAsyncGetResultsAction.class),
|
||||||
new ActionHandler<>(EsqlStatsAction.INSTANCE, TransportEsqlStatsAction.class),
|
new ActionHandler(EsqlStatsAction.INSTANCE, TransportEsqlStatsAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.ESQL, EsqlUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.ESQL, EsqlUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.ESQL, EsqlInfoTransportAction.class),
|
new ActionHandler(XPackInfoFeatureAction.ESQL, EsqlInfoTransportAction.class),
|
||||||
new ActionHandler<>(EsqlResolveFieldsAction.TYPE, EsqlResolveFieldsAction.class),
|
new ActionHandler(EsqlResolveFieldsAction.TYPE, EsqlResolveFieldsAction.class),
|
||||||
new ActionHandler<>(EsqlSearchShardsAction.TYPE, EsqlSearchShardsAction.class),
|
new ActionHandler(EsqlSearchShardsAction.TYPE, EsqlSearchShardsAction.class),
|
||||||
new ActionHandler<>(EsqlAsyncStopAction.INSTANCE, TransportEsqlAsyncStopAction.class)
|
new ActionHandler(EsqlAsyncStopAction.INSTANCE, TransportEsqlAsyncStopAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ import org.elasticsearch.ExceptionsHelper;
|
||||||
import org.elasticsearch.ResourceNotFoundException;
|
import org.elasticsearch.ResourceNotFoundException;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse.ResetFeatureStateStatus;
|
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse.ResetFeatureStateStatus;
|
||||||
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
|
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
|
||||||
import org.elasticsearch.action.datastreams.DeleteDataStreamAction;
|
import org.elasticsearch.action.datastreams.DeleteDataStreamAction;
|
||||||
|
@ -345,13 +343,13 @@ public class Fleet extends Plugin implements SystemIndexPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(GetGlobalCheckpointsAction.INSTANCE, GetGlobalCheckpointsAction.LocalAction.class),
|
new ActionHandler(GetGlobalCheckpointsAction.INSTANCE, GetGlobalCheckpointsAction.LocalAction.class),
|
||||||
new ActionHandler<>(GetGlobalCheckpointsShardAction.INSTANCE, GetGlobalCheckpointsShardAction.TransportAction.class),
|
new ActionHandler(GetGlobalCheckpointsShardAction.INSTANCE, GetGlobalCheckpointsShardAction.TransportAction.class),
|
||||||
new ActionHandler<>(GetSecretAction.INSTANCE, TransportGetSecretAction.class),
|
new ActionHandler(GetSecretAction.INSTANCE, TransportGetSecretAction.class),
|
||||||
new ActionHandler<>(PostSecretAction.INSTANCE, TransportPostSecretAction.class),
|
new ActionHandler(PostSecretAction.INSTANCE, TransportPostSecretAction.class),
|
||||||
new ActionHandler<>(DeleteSecretAction.INSTANCE, TransportDeleteSecretAction.class)
|
new ActionHandler(DeleteSecretAction.INSTANCE, TransportDeleteSecretAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.frozen;
|
package org.elasticsearch.xpack.frozen;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.plugins.ActionPlugin;
|
import org.elasticsearch.plugins.ActionPlugin;
|
||||||
import org.elasticsearch.plugins.Plugin;
|
import org.elasticsearch.plugins.Plugin;
|
||||||
import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;
|
import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction;
|
||||||
|
@ -18,9 +16,9 @@ import java.util.List;
|
||||||
public class FrozenIndices extends Plugin implements ActionPlugin {
|
public class FrozenIndices extends Plugin implements ActionPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionHandler<>(XPackUsageFeatureAction.FROZEN_INDICES, FrozenIndicesUsageTransportAction.class));
|
actions.add(new ActionHandler(XPackUsageFeatureAction.FROZEN_INDICES, FrozenIndicesUsageTransportAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.graph;
|
package org.elasticsearch.xpack.graph;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -48,13 +46,13 @@ public class Graph extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.GRAPH, GraphUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.GRAPH, GraphUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.GRAPH, GraphInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.GRAPH, GraphInfoTransportAction.class);
|
||||||
if (false == enabled) {
|
if (false == enabled) {
|
||||||
return Arrays.asList(usageAction, infoAction);
|
return Arrays.asList(usageAction, infoAction);
|
||||||
}
|
}
|
||||||
return Arrays.asList(new ActionHandler<>(GraphExploreAction.INSTANCE, TransportGraphExploreAction.class), usageAction, infoAction);
|
return Arrays.asList(new ActionHandler(GraphExploreAction.INSTANCE, TransportGraphExploreAction.class), usageAction, infoAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.idp;
|
package org.elasticsearch.xpack.idp;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -125,16 +123,16 @@ public class IdentityProviderPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
if (enabled == false) {
|
if (enabled == false) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(SamlInitiateSingleSignOnAction.INSTANCE, TransportSamlInitiateSingleSignOnAction.class),
|
new ActionHandler(SamlInitiateSingleSignOnAction.INSTANCE, TransportSamlInitiateSingleSignOnAction.class),
|
||||||
new ActionHandler<>(SamlValidateAuthnRequestAction.INSTANCE, TransportSamlValidateAuthnRequestAction.class),
|
new ActionHandler(SamlValidateAuthnRequestAction.INSTANCE, TransportSamlValidateAuthnRequestAction.class),
|
||||||
new ActionHandler<>(SamlMetadataAction.INSTANCE, TransportSamlMetadataAction.class),
|
new ActionHandler(SamlMetadataAction.INSTANCE, TransportSamlMetadataAction.class),
|
||||||
new ActionHandler<>(PutSamlServiceProviderAction.INSTANCE, TransportPutSamlServiceProviderAction.class),
|
new ActionHandler(PutSamlServiceProviderAction.INSTANCE, TransportPutSamlServiceProviderAction.class),
|
||||||
new ActionHandler<>(DeleteSamlServiceProviderAction.INSTANCE, TransportDeleteSamlServiceProviderAction.class)
|
new ActionHandler(DeleteSamlServiceProviderAction.INSTANCE, TransportDeleteSamlServiceProviderAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@ package org.elasticsearch.xpack.ilm;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.OriginSettingClient;
|
import org.elasticsearch.client.internal.OriginSettingClient;
|
||||||
import org.elasticsearch.cluster.ClusterState;
|
import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
@ -275,21 +273,21 @@ public class IndexLifecycle extends Plugin implements ActionPlugin, HealthPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.INDEX_LIFECYCLE, IndexLifecycleUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.INDEX_LIFECYCLE, IndexLifecycleUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.INDEX_LIFECYCLE, IndexLifecycleInfoTransportAction.class),
|
new ActionHandler(XPackInfoFeatureAction.INDEX_LIFECYCLE, IndexLifecycleInfoTransportAction.class),
|
||||||
new ActionHandler<>(MigrateToDataTiersAction.INSTANCE, TransportMigrateToDataTiersAction.class),
|
new ActionHandler(MigrateToDataTiersAction.INSTANCE, TransportMigrateToDataTiersAction.class),
|
||||||
new ActionHandler<>(ILMActions.PUT, TransportPutLifecycleAction.class),
|
new ActionHandler(ILMActions.PUT, TransportPutLifecycleAction.class),
|
||||||
new ActionHandler<>(GetLifecycleAction.INSTANCE, TransportGetLifecycleAction.class),
|
new ActionHandler(GetLifecycleAction.INSTANCE, TransportGetLifecycleAction.class),
|
||||||
new ActionHandler<>(DeleteLifecycleAction.INSTANCE, TransportDeleteLifecycleAction.class),
|
new ActionHandler(DeleteLifecycleAction.INSTANCE, TransportDeleteLifecycleAction.class),
|
||||||
new ActionHandler<>(ExplainLifecycleAction.INSTANCE, TransportExplainLifecycleAction.class),
|
new ActionHandler(ExplainLifecycleAction.INSTANCE, TransportExplainLifecycleAction.class),
|
||||||
new ActionHandler<>(RemoveIndexLifecyclePolicyAction.INSTANCE, TransportRemoveIndexLifecyclePolicyAction.class),
|
new ActionHandler(RemoveIndexLifecyclePolicyAction.INSTANCE, TransportRemoveIndexLifecyclePolicyAction.class),
|
||||||
new ActionHandler<>(ILMActions.MOVE_TO_STEP, TransportMoveToStepAction.class),
|
new ActionHandler(ILMActions.MOVE_TO_STEP, TransportMoveToStepAction.class),
|
||||||
new ActionHandler<>(ILMActions.RETRY, TransportRetryAction.class),
|
new ActionHandler(ILMActions.RETRY, TransportRetryAction.class),
|
||||||
new ActionHandler<>(ILMActions.START, TransportStartILMAction.class),
|
new ActionHandler(ILMActions.START, TransportStartILMAction.class),
|
||||||
new ActionHandler<>(ILMActions.STOP, TransportStopILMAction.class),
|
new ActionHandler(ILMActions.STOP, TransportStopILMAction.class),
|
||||||
new ActionHandler<>(GetStatusAction.INSTANCE, TransportGetStatusAction.class)
|
new ActionHandler(GetStatusAction.INSTANCE, TransportGetStatusAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@ package org.elasticsearch.xpack.inference;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.support.MappedActionFilter;
|
import org.elasticsearch.action.support.MappedActionFilter;
|
||||||
import org.elasticsearch.cluster.NamedDiff;
|
import org.elasticsearch.cluster.NamedDiff;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
|
@ -206,18 +204,18 @@ public class InferencePlugin extends Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(InferenceAction.INSTANCE, TransportInferenceAction.class),
|
new ActionHandler(InferenceAction.INSTANCE, TransportInferenceAction.class),
|
||||||
new ActionHandler<>(InferenceActionProxy.INSTANCE, TransportInferenceActionProxy.class),
|
new ActionHandler(InferenceActionProxy.INSTANCE, TransportInferenceActionProxy.class),
|
||||||
new ActionHandler<>(GetInferenceModelAction.INSTANCE, TransportGetInferenceModelAction.class),
|
new ActionHandler(GetInferenceModelAction.INSTANCE, TransportGetInferenceModelAction.class),
|
||||||
new ActionHandler<>(PutInferenceModelAction.INSTANCE, TransportPutInferenceModelAction.class),
|
new ActionHandler(PutInferenceModelAction.INSTANCE, TransportPutInferenceModelAction.class),
|
||||||
new ActionHandler<>(UpdateInferenceModelAction.INSTANCE, TransportUpdateInferenceModelAction.class),
|
new ActionHandler(UpdateInferenceModelAction.INSTANCE, TransportUpdateInferenceModelAction.class),
|
||||||
new ActionHandler<>(DeleteInferenceEndpointAction.INSTANCE, TransportDeleteInferenceEndpointAction.class),
|
new ActionHandler(DeleteInferenceEndpointAction.INSTANCE, TransportDeleteInferenceEndpointAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.INFERENCE, TransportInferenceUsageAction.class),
|
new ActionHandler(XPackUsageFeatureAction.INFERENCE, TransportInferenceUsageAction.class),
|
||||||
new ActionHandler<>(GetInferenceDiagnosticsAction.INSTANCE, TransportGetInferenceDiagnosticsAction.class),
|
new ActionHandler(GetInferenceDiagnosticsAction.INSTANCE, TransportGetInferenceDiagnosticsAction.class),
|
||||||
new ActionHandler<>(GetInferenceServicesAction.INSTANCE, TransportGetInferenceServicesAction.class),
|
new ActionHandler(GetInferenceServicesAction.INSTANCE, TransportGetInferenceServicesAction.class),
|
||||||
new ActionHandler<>(UnifiedCompletionAction.INSTANCE, TransportUnifiedCompletionInferenceAction.class)
|
new ActionHandler(UnifiedCompletionAction.INSTANCE, TransportUnifiedCompletionInferenceAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.logsdb;
|
package org.elasticsearch.xpack.logsdb;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||||
import org.elasticsearch.common.settings.Setting;
|
import org.elasticsearch.common.settings.Setting;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
|
@ -93,10 +91,10 @@ public class LogsDBPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionPlugin.ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionPlugin.ActionHandler> getActions() {
|
||||||
List<ActionPlugin.ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionPlugin.ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionPlugin.ActionHandler<>(XPackUsageFeatureAction.LOGSDB, LogsDBUsageTransportAction.class));
|
actions.add(new ActionPlugin.ActionHandler(XPackUsageFeatureAction.LOGSDB, LogsDBUsageTransportAction.class));
|
||||||
actions.add(new ActionPlugin.ActionHandler<>(XPackInfoFeatureAction.LOGSDB, LogsDBInfoTransportAction.class));
|
actions.add(new ActionPlugin.ActionHandler(XPackInfoFeatureAction.LOGSDB, LogsDBInfoTransportAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.logstash;
|
package org.elasticsearch.xpack.logstash;
|
||||||
|
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
|
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
|
||||||
|
@ -68,13 +66,13 @@ public class Logstash extends Plugin implements SystemIndexPlugin {
|
||||||
public Logstash() {}
|
public Logstash() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.LOGSTASH, LogstashUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.LOGSTASH, LogstashUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.LOGSTASH, LogstashInfoTransportAction.class),
|
new ActionHandler(XPackInfoFeatureAction.LOGSTASH, LogstashInfoTransportAction.class),
|
||||||
new ActionHandler<>(PutPipelineAction.INSTANCE, TransportPutPipelineAction.class),
|
new ActionHandler(PutPipelineAction.INSTANCE, TransportPutPipelineAction.class),
|
||||||
new ActionHandler<>(GetPipelineAction.INSTANCE, TransportGetPipelineAction.class),
|
new ActionHandler(GetPipelineAction.INSTANCE, TransportGetPipelineAction.class),
|
||||||
new ActionHandler<>(DeletePipelineAction.INSTANCE, TransportDeletePipelineAction.class)
|
new ActionHandler(DeletePipelineAction.INSTANCE, TransportDeletePipelineAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.aggregatemetric;
|
package org.elasticsearch.xpack.aggregatemetric;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.index.mapper.Mapper;
|
import org.elasticsearch.index.mapper.Mapper;
|
||||||
import org.elasticsearch.plugins.ActionPlugin;
|
import org.elasticsearch.plugins.ActionPlugin;
|
||||||
import org.elasticsearch.plugins.ExtensiblePlugin;
|
import org.elasticsearch.plugins.ExtensiblePlugin;
|
||||||
|
@ -36,10 +34,10 @@ public class AggregateMetricMapperPlugin extends Plugin implements MapperPlugin,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.AGGREGATE_METRIC, AggregateMetricUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.AGGREGATE_METRIC, AggregateMetricUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.AGGREGATE_METRIC, AggregateMetricInfoTransportAction.class)
|
new ActionHandler(XPackInfoFeatureAction.AGGREGATE_METRIC, AggregateMetricInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
package org.elasticsearch.xpack.migrate;
|
package org.elasticsearch.xpack.migrate;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.client.internal.OriginSettingClient;
|
import org.elasticsearch.client.internal.OriginSettingClient;
|
||||||
import org.elasticsearch.cluster.NamedDiff;
|
import org.elasticsearch.cluster.NamedDiff;
|
||||||
|
@ -121,17 +119,17 @@ public class MigratePlugin extends Plugin implements ActionPlugin, PersistentTas
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(new ActionHandler<>(ReindexDataStreamAction.INSTANCE, ReindexDataStreamTransportAction.class));
|
actions.add(new ActionHandler(ReindexDataStreamAction.INSTANCE, ReindexDataStreamTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(GetMigrationReindexStatusAction.INSTANCE, GetMigrationReindexStatusTransportAction.class));
|
actions.add(new ActionHandler(GetMigrationReindexStatusAction.INSTANCE, GetMigrationReindexStatusTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(CancelReindexDataStreamAction.INSTANCE, CancelReindexDataStreamTransportAction.class));
|
actions.add(new ActionHandler(CancelReindexDataStreamAction.INSTANCE, CancelReindexDataStreamTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(ReindexDataStreamIndexAction.INSTANCE, ReindexDataStreamIndexTransportAction.class));
|
actions.add(new ActionHandler(ReindexDataStreamIndexAction.INSTANCE, ReindexDataStreamIndexTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(CreateIndexFromSourceAction.INSTANCE, CreateIndexFromSourceTransportAction.class));
|
actions.add(new ActionHandler(CreateIndexFromSourceAction.INSTANCE, CreateIndexFromSourceTransportAction.class));
|
||||||
actions.add(new ActionHandler<>(CopyLifecycleIndexMetadataAction.INSTANCE, CopyLifecycleIndexMetadataTransportAction.class));
|
actions.add(new ActionHandler(CopyLifecycleIndexMetadataAction.INSTANCE, CopyLifecycleIndexMetadataTransportAction.class));
|
||||||
|
|
||||||
actions.add(new ActionHandler<>(GetFeatureUpgradeStatusAction.INSTANCE, TransportGetFeatureUpgradeStatusAction.class));
|
actions.add(new ActionHandler(GetFeatureUpgradeStatusAction.INSTANCE, TransportGetFeatureUpgradeStatusAction.class));
|
||||||
actions.add(new ActionHandler<>(PostFeatureUpgradeAction.INSTANCE, TransportPostFeatureUpgradeAction.class));
|
actions.add(new ActionHandler(PostFeatureUpgradeAction.INSTANCE, TransportPostFeatureUpgradeAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.ml.packageloader;
|
package org.elasticsearch.xpack.ml.packageloader;
|
||||||
|
|
||||||
import org.elasticsearch.Build;
|
import org.elasticsearch.Build;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.bootstrap.BootstrapCheck;
|
import org.elasticsearch.bootstrap.BootstrapCheck;
|
||||||
import org.elasticsearch.bootstrap.BootstrapContext;
|
import org.elasticsearch.bootstrap.BootstrapContext;
|
||||||
import org.elasticsearch.common.ReferenceDocs;
|
import org.elasticsearch.common.ReferenceDocs;
|
||||||
|
@ -66,11 +64,11 @@ public class MachineLearningPackageLoader extends Plugin implements ActionPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
// all internal, no rest endpoint
|
// all internal, no rest endpoint
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(GetTrainedModelPackageConfigAction.INSTANCE, TransportGetTrainedModelPackageConfigAction.class),
|
new ActionHandler(GetTrainedModelPackageConfigAction.INSTANCE, TransportGetTrainedModelPackageConfigAction.class),
|
||||||
new ActionHandler<>(LoadTrainedModelPackageAction.INSTANCE, TransportLoadTrainedModelPackage.class)
|
new ActionHandler(LoadTrainedModelPackageAction.INSTANCE, TransportLoadTrainedModelPackage.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
||||||
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse;
|
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse;
|
||||||
import org.elasticsearch.action.support.ActionFilter;
|
import org.elasticsearch.action.support.ActionFilter;
|
||||||
|
@ -1511,148 +1509,146 @@ public class MachineLearning extends Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actionHandlers = new ArrayList<>();
|
List<ActionHandler> actionHandlers = new ArrayList<>();
|
||||||
actionHandlers.add(new ActionHandler<>(XPackUsageFeatureAction.MACHINE_LEARNING, MachineLearningUsageTransportAction.class));
|
actionHandlers.add(new ActionHandler(XPackUsageFeatureAction.MACHINE_LEARNING, MachineLearningUsageTransportAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(XPackInfoFeatureAction.MACHINE_LEARNING, MachineLearningInfoTransportAction.class));
|
actionHandlers.add(new ActionHandler(XPackInfoFeatureAction.MACHINE_LEARNING, MachineLearningInfoTransportAction.class));
|
||||||
if (false == enabled) {
|
if (false == enabled) {
|
||||||
return actionHandlers;
|
return actionHandlers;
|
||||||
}
|
}
|
||||||
actionHandlers.add(new ActionHandler<>(AuditMlNotificationAction.INSTANCE, TransportAuditMlNotificationAction.class));
|
actionHandlers.add(new ActionHandler(AuditMlNotificationAction.INSTANCE, TransportAuditMlNotificationAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(MlInfoAction.INSTANCE, TransportMlInfoAction.class));
|
actionHandlers.add(new ActionHandler(MlInfoAction.INSTANCE, TransportMlInfoAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(MlMemoryAction.INSTANCE, TransportMlMemoryAction.class));
|
actionHandlers.add(new ActionHandler(MlMemoryAction.INSTANCE, TransportMlMemoryAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(SetUpgradeModeAction.INSTANCE, TransportSetUpgradeModeAction.class));
|
actionHandlers.add(new ActionHandler(SetUpgradeModeAction.INSTANCE, TransportSetUpgradeModeAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(SetResetModeAction.INSTANCE, TransportSetResetModeAction.class));
|
actionHandlers.add(new ActionHandler(SetResetModeAction.INSTANCE, TransportSetResetModeAction.class));
|
||||||
// Included in this section as it's used by MlMemoryAction
|
// Included in this section as it's used by MlMemoryAction
|
||||||
actionHandlers.add(new ActionHandler<>(TrainedModelCacheInfoAction.INSTANCE, TransportTrainedModelCacheInfoAction.class));
|
actionHandlers.add(new ActionHandler(TrainedModelCacheInfoAction.INSTANCE, TransportTrainedModelCacheInfoAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetMlAutoscalingStats.INSTANCE, TransportGetMlAutoscalingStats.class));
|
actionHandlers.add(new ActionHandler(GetMlAutoscalingStats.INSTANCE, TransportGetMlAutoscalingStats.class));
|
||||||
if (machineLearningExtension.get().isAnomalyDetectionEnabled()) {
|
if (machineLearningExtension.get().isAnomalyDetectionEnabled()) {
|
||||||
actionHandlers.add(new ActionHandler<>(GetJobsAction.INSTANCE, TransportGetJobsAction.class));
|
actionHandlers.add(new ActionHandler(GetJobsAction.INSTANCE, TransportGetJobsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetJobsStatsAction.INSTANCE, TransportGetJobsStatsAction.class));
|
actionHandlers.add(new ActionHandler(GetJobsStatsAction.INSTANCE, TransportGetJobsStatsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PutJobAction.INSTANCE, TransportPutJobAction.class));
|
actionHandlers.add(new ActionHandler(PutJobAction.INSTANCE, TransportPutJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpdateJobAction.INSTANCE, TransportUpdateJobAction.class));
|
actionHandlers.add(new ActionHandler(UpdateJobAction.INSTANCE, TransportUpdateJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteJobAction.INSTANCE, TransportDeleteJobAction.class));
|
actionHandlers.add(new ActionHandler(DeleteJobAction.INSTANCE, TransportDeleteJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(OpenJobAction.INSTANCE, TransportOpenJobAction.class));
|
actionHandlers.add(new ActionHandler(OpenJobAction.INSTANCE, TransportOpenJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetFiltersAction.INSTANCE, TransportGetFiltersAction.class));
|
actionHandlers.add(new ActionHandler(GetFiltersAction.INSTANCE, TransportGetFiltersAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PutFilterAction.INSTANCE, TransportPutFilterAction.class));
|
actionHandlers.add(new ActionHandler(PutFilterAction.INSTANCE, TransportPutFilterAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpdateFilterAction.INSTANCE, TransportUpdateFilterAction.class));
|
actionHandlers.add(new ActionHandler(UpdateFilterAction.INSTANCE, TransportUpdateFilterAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteFilterAction.INSTANCE, TransportDeleteFilterAction.class));
|
actionHandlers.add(new ActionHandler(DeleteFilterAction.INSTANCE, TransportDeleteFilterAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(KillProcessAction.INSTANCE, TransportKillProcessAction.class));
|
actionHandlers.add(new ActionHandler(KillProcessAction.INSTANCE, TransportKillProcessAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetBucketsAction.INSTANCE, TransportGetBucketsAction.class));
|
actionHandlers.add(new ActionHandler(GetBucketsAction.INSTANCE, TransportGetBucketsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetInfluencersAction.INSTANCE, TransportGetInfluencersAction.class));
|
actionHandlers.add(new ActionHandler(GetInfluencersAction.INSTANCE, TransportGetInfluencersAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetOverallBucketsAction.INSTANCE, TransportGetOverallBucketsAction.class));
|
actionHandlers.add(new ActionHandler(GetOverallBucketsAction.INSTANCE, TransportGetOverallBucketsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetRecordsAction.INSTANCE, TransportGetRecordsAction.class));
|
actionHandlers.add(new ActionHandler(GetRecordsAction.INSTANCE, TransportGetRecordsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PostDataAction.INSTANCE, TransportPostDataAction.class));
|
actionHandlers.add(new ActionHandler(PostDataAction.INSTANCE, TransportPostDataAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(CloseJobAction.INSTANCE, TransportCloseJobAction.class));
|
actionHandlers.add(new ActionHandler(CloseJobAction.INSTANCE, TransportCloseJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(FinalizeJobExecutionAction.INSTANCE, TransportFinalizeJobExecutionAction.class));
|
actionHandlers.add(new ActionHandler(FinalizeJobExecutionAction.INSTANCE, TransportFinalizeJobExecutionAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(FlushJobAction.INSTANCE, TransportFlushJobAction.class));
|
actionHandlers.add(new ActionHandler(FlushJobAction.INSTANCE, TransportFlushJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(ResetJobAction.INSTANCE, TransportResetJobAction.class));
|
actionHandlers.add(new ActionHandler(ResetJobAction.INSTANCE, TransportResetJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(ValidateDetectorAction.INSTANCE, TransportValidateDetectorAction.class));
|
actionHandlers.add(new ActionHandler(ValidateDetectorAction.INSTANCE, TransportValidateDetectorAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(ValidateJobConfigAction.INSTANCE, TransportValidateJobConfigAction.class));
|
actionHandlers.add(new ActionHandler(ValidateJobConfigAction.INSTANCE, TransportValidateJobConfigAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(EstimateModelMemoryAction.INSTANCE, TransportEstimateModelMemoryAction.class));
|
actionHandlers.add(new ActionHandler(EstimateModelMemoryAction.INSTANCE, TransportEstimateModelMemoryAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetCategoriesAction.INSTANCE, TransportGetCategoriesAction.class));
|
actionHandlers.add(new ActionHandler(GetCategoriesAction.INSTANCE, TransportGetCategoriesAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetModelSnapshotsAction.INSTANCE, TransportGetModelSnapshotsAction.class));
|
actionHandlers.add(new ActionHandler(GetModelSnapshotsAction.INSTANCE, TransportGetModelSnapshotsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(RevertModelSnapshotAction.INSTANCE, TransportRevertModelSnapshotAction.class));
|
actionHandlers.add(new ActionHandler(RevertModelSnapshotAction.INSTANCE, TransportRevertModelSnapshotAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpdateModelSnapshotAction.INSTANCE, TransportUpdateModelSnapshotAction.class));
|
actionHandlers.add(new ActionHandler(UpdateModelSnapshotAction.INSTANCE, TransportUpdateModelSnapshotAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetDatafeedsAction.INSTANCE, TransportGetDatafeedsAction.class));
|
actionHandlers.add(new ActionHandler(GetDatafeedsAction.INSTANCE, TransportGetDatafeedsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetDatafeedsStatsAction.INSTANCE, TransportGetDatafeedsStatsAction.class));
|
actionHandlers.add(new ActionHandler(GetDatafeedsStatsAction.INSTANCE, TransportGetDatafeedsStatsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PutDatafeedAction.INSTANCE, TransportPutDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(PutDatafeedAction.INSTANCE, TransportPutDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpdateDatafeedAction.INSTANCE, TransportUpdateDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(UpdateDatafeedAction.INSTANCE, TransportUpdateDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteDatafeedAction.INSTANCE, TransportDeleteDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(DeleteDatafeedAction.INSTANCE, TransportDeleteDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PreviewDatafeedAction.INSTANCE, TransportPreviewDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(PreviewDatafeedAction.INSTANCE, TransportPreviewDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(StartDatafeedAction.INSTANCE, TransportStartDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(StartDatafeedAction.INSTANCE, TransportStartDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(StopDatafeedAction.INSTANCE, TransportStopDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(StopDatafeedAction.INSTANCE, TransportStopDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(IsolateDatafeedAction.INSTANCE, TransportIsolateDatafeedAction.class));
|
actionHandlers.add(new ActionHandler(IsolateDatafeedAction.INSTANCE, TransportIsolateDatafeedAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteModelSnapshotAction.INSTANCE, TransportDeleteModelSnapshotAction.class));
|
actionHandlers.add(new ActionHandler(DeleteModelSnapshotAction.INSTANCE, TransportDeleteModelSnapshotAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpdateProcessAction.INSTANCE, TransportUpdateProcessAction.class));
|
actionHandlers.add(new ActionHandler(UpdateProcessAction.INSTANCE, TransportUpdateProcessAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(ForecastJobAction.INSTANCE, TransportForecastJobAction.class));
|
actionHandlers.add(new ActionHandler(ForecastJobAction.INSTANCE, TransportForecastJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteForecastAction.INSTANCE, TransportDeleteForecastAction.class));
|
actionHandlers.add(new ActionHandler(DeleteForecastAction.INSTANCE, TransportDeleteForecastAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetCalendarsAction.INSTANCE, TransportGetCalendarsAction.class));
|
actionHandlers.add(new ActionHandler(GetCalendarsAction.INSTANCE, TransportGetCalendarsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PutCalendarAction.INSTANCE, TransportPutCalendarAction.class));
|
actionHandlers.add(new ActionHandler(PutCalendarAction.INSTANCE, TransportPutCalendarAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteCalendarAction.INSTANCE, TransportDeleteCalendarAction.class));
|
actionHandlers.add(new ActionHandler(DeleteCalendarAction.INSTANCE, TransportDeleteCalendarAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteCalendarEventAction.INSTANCE, TransportDeleteCalendarEventAction.class));
|
actionHandlers.add(new ActionHandler(DeleteCalendarEventAction.INSTANCE, TransportDeleteCalendarEventAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpdateCalendarJobAction.INSTANCE, TransportUpdateCalendarJobAction.class));
|
actionHandlers.add(new ActionHandler(UpdateCalendarJobAction.INSTANCE, TransportUpdateCalendarJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetCalendarEventsAction.INSTANCE, TransportGetCalendarEventsAction.class));
|
actionHandlers.add(new ActionHandler(GetCalendarEventsAction.INSTANCE, TransportGetCalendarEventsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PostCalendarEventsAction.INSTANCE, TransportPostCalendarEventsAction.class));
|
actionHandlers.add(new ActionHandler(PostCalendarEventsAction.INSTANCE, TransportPostCalendarEventsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PersistJobAction.INSTANCE, TransportPersistJobAction.class));
|
actionHandlers.add(new ActionHandler(PersistJobAction.INSTANCE, TransportPersistJobAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(UpgradeJobModelSnapshotAction.INSTANCE, TransportUpgradeJobModelSnapshotAction.class));
|
actionHandlers.add(new ActionHandler(UpgradeJobModelSnapshotAction.INSTANCE, TransportUpgradeJobModelSnapshotAction.class));
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(CancelJobModelSnapshotUpgradeAction.INSTANCE, TransportCancelJobModelSnapshotUpgradeAction.class)
|
new ActionHandler(CancelJobModelSnapshotUpgradeAction.INSTANCE, TransportCancelJobModelSnapshotUpgradeAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(GetJobModelSnapshotsUpgradeStatsAction.INSTANCE, TransportGetJobModelSnapshotsUpgradeStatsAction.class)
|
new ActionHandler(GetJobModelSnapshotsUpgradeStatsAction.INSTANCE, TransportGetJobModelSnapshotsUpgradeStatsAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(new ActionHandler<>(GetDatafeedRunningStateAction.INSTANCE, TransportGetDatafeedRunningStateAction.class));
|
actionHandlers.add(new ActionHandler(GetDatafeedRunningStateAction.INSTANCE, TransportGetDatafeedRunningStateAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteExpiredDataAction.INSTANCE, TransportDeleteExpiredDataAction.class));
|
actionHandlers.add(new ActionHandler(DeleteExpiredDataAction.INSTANCE, TransportDeleteExpiredDataAction.class));
|
||||||
}
|
}
|
||||||
if (machineLearningExtension.get().isDataFrameAnalyticsEnabled() || machineLearningExtension.get().isNlpEnabled()) {
|
if (machineLearningExtension.get().isDataFrameAnalyticsEnabled() || machineLearningExtension.get().isNlpEnabled()) {
|
||||||
actionHandlers.add(new ActionHandler<>(GetTrainedModelsAction.INSTANCE, TransportGetTrainedModelsAction.class));
|
actionHandlers.add(new ActionHandler(GetTrainedModelsAction.INSTANCE, TransportGetTrainedModelsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteTrainedModelAction.INSTANCE, TransportDeleteTrainedModelAction.class));
|
actionHandlers.add(new ActionHandler(DeleteTrainedModelAction.INSTANCE, TransportDeleteTrainedModelAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetTrainedModelsStatsAction.INSTANCE, TransportGetTrainedModelsStatsAction.class));
|
actionHandlers.add(new ActionHandler(GetTrainedModelsStatsAction.INSTANCE, TransportGetTrainedModelsStatsAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PutTrainedModelAction.INSTANCE, TransportPutTrainedModelAction.class));
|
actionHandlers.add(new ActionHandler(PutTrainedModelAction.INSTANCE, TransportPutTrainedModelAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(PutTrainedModelAliasAction.INSTANCE, TransportPutTrainedModelAliasAction.class));
|
actionHandlers.add(new ActionHandler(PutTrainedModelAliasAction.INSTANCE, TransportPutTrainedModelAliasAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(DeleteTrainedModelAliasAction.INSTANCE, TransportDeleteTrainedModelAliasAction.class));
|
actionHandlers.add(new ActionHandler(DeleteTrainedModelAliasAction.INSTANCE, TransportDeleteTrainedModelAliasAction.class));
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(PutTrainedModelDefinitionPartAction.INSTANCE, TransportPutTrainedModelDefinitionPartAction.class)
|
new ActionHandler(PutTrainedModelDefinitionPartAction.INSTANCE, TransportPutTrainedModelDefinitionPartAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(new ActionHandler<>(FlushTrainedModelCacheAction.INSTANCE, TransportFlushTrainedModelCacheAction.class));
|
actionHandlers.add(new ActionHandler(FlushTrainedModelCacheAction.INSTANCE, TransportFlushTrainedModelCacheAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(InferModelAction.INSTANCE, TransportInternalInferModelAction.class));
|
actionHandlers.add(new ActionHandler(InferModelAction.INSTANCE, TransportInternalInferModelAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(InferModelAction.EXTERNAL_INSTANCE, TransportExternalInferModelAction.class));
|
actionHandlers.add(new ActionHandler(InferModelAction.EXTERNAL_INSTANCE, TransportExternalInferModelAction.class));
|
||||||
actionHandlers.add(new ActionHandler<>(GetDeploymentStatsAction.INSTANCE, TransportGetDeploymentStatsAction.class));
|
actionHandlers.add(new ActionHandler(GetDeploymentStatsAction.INSTANCE, TransportGetDeploymentStatsAction.class));
|
||||||
if (machineLearningExtension.get().isDataFrameAnalyticsEnabled()) {
|
if (machineLearningExtension.get().isDataFrameAnalyticsEnabled()) {
|
||||||
actionHandlers.add(new ActionHandler<>(GetDataFrameAnalyticsAction.INSTANCE, TransportGetDataFrameAnalyticsAction.class));
|
actionHandlers.add(new ActionHandler(GetDataFrameAnalyticsAction.INSTANCE, TransportGetDataFrameAnalyticsAction.class));
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(GetDataFrameAnalyticsStatsAction.INSTANCE, TransportGetDataFrameAnalyticsStatsAction.class)
|
new ActionHandler(GetDataFrameAnalyticsStatsAction.INSTANCE, TransportGetDataFrameAnalyticsStatsAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(new ActionHandler<>(PutDataFrameAnalyticsAction.INSTANCE, TransportPutDataFrameAnalyticsAction.class));
|
actionHandlers.add(new ActionHandler(PutDataFrameAnalyticsAction.INSTANCE, TransportPutDataFrameAnalyticsAction.class));
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(UpdateDataFrameAnalyticsAction.INSTANCE, TransportUpdateDataFrameAnalyticsAction.class)
|
new ActionHandler(UpdateDataFrameAnalyticsAction.INSTANCE, TransportUpdateDataFrameAnalyticsAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(DeleteDataFrameAnalyticsAction.INSTANCE, TransportDeleteDataFrameAnalyticsAction.class)
|
new ActionHandler(DeleteDataFrameAnalyticsAction.INSTANCE, TransportDeleteDataFrameAnalyticsAction.class)
|
||||||
|
);
|
||||||
|
actionHandlers.add(new ActionHandler(StartDataFrameAnalyticsAction.INSTANCE, TransportStartDataFrameAnalyticsAction.class));
|
||||||
|
actionHandlers.add(new ActionHandler(StopDataFrameAnalyticsAction.INSTANCE, TransportStopDataFrameAnalyticsAction.class));
|
||||||
|
actionHandlers.add(new ActionHandler(EvaluateDataFrameAction.INSTANCE, TransportEvaluateDataFrameAction.class));
|
||||||
|
actionHandlers.add(
|
||||||
|
new ActionHandler(ExplainDataFrameAnalyticsAction.INSTANCE, TransportExplainDataFrameAnalyticsAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(StartDataFrameAnalyticsAction.INSTANCE, TransportStartDataFrameAnalyticsAction.class)
|
new ActionHandler(PreviewDataFrameAnalyticsAction.INSTANCE, TransportPreviewDataFrameAnalyticsAction.class)
|
||||||
);
|
|
||||||
actionHandlers.add(new ActionHandler<>(StopDataFrameAnalyticsAction.INSTANCE, TransportStopDataFrameAnalyticsAction.class));
|
|
||||||
actionHandlers.add(new ActionHandler<>(EvaluateDataFrameAction.INSTANCE, TransportEvaluateDataFrameAction.class));
|
|
||||||
actionHandlers.add(
|
|
||||||
new ActionHandler<>(ExplainDataFrameAnalyticsAction.INSTANCE, TransportExplainDataFrameAnalyticsAction.class)
|
|
||||||
);
|
|
||||||
actionHandlers.add(
|
|
||||||
new ActionHandler<>(PreviewDataFrameAnalyticsAction.INSTANCE, TransportPreviewDataFrameAnalyticsAction.class)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (machineLearningExtension.get().isNlpEnabled()) {
|
if (machineLearningExtension.get().isNlpEnabled()) {
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(StartTrainedModelDeploymentAction.INSTANCE, TransportStartTrainedModelDeploymentAction.class)
|
new ActionHandler(StartTrainedModelDeploymentAction.INSTANCE, TransportStartTrainedModelDeploymentAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(StopTrainedModelDeploymentAction.INSTANCE, TransportStopTrainedModelDeploymentAction.class)
|
new ActionHandler(StopTrainedModelDeploymentAction.INSTANCE, TransportStopTrainedModelDeploymentAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(InferTrainedModelDeploymentAction.INSTANCE, TransportInferTrainedModelDeploymentAction.class)
|
new ActionHandler(InferTrainedModelDeploymentAction.INSTANCE, TransportInferTrainedModelDeploymentAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(UpdateTrainedModelDeploymentAction.INSTANCE, TransportUpdateTrainedModelDeploymentAction.class)
|
new ActionHandler(UpdateTrainedModelDeploymentAction.INSTANCE, TransportUpdateTrainedModelDeploymentAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(PutTrainedModelVocabularyAction.INSTANCE, TransportPutTrainedModelVocabularyAction.class)
|
new ActionHandler(PutTrainedModelVocabularyAction.INSTANCE, TransportPutTrainedModelVocabularyAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(new ActionHandler<>(ClearDeploymentCacheAction.INSTANCE, TransportClearDeploymentCacheAction.class));
|
actionHandlers.add(new ActionHandler(ClearDeploymentCacheAction.INSTANCE, TransportClearDeploymentCacheAction.class));
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(CreateTrainedModelAssignmentAction.INSTANCE, TransportCreateTrainedModelAssignmentAction.class)
|
new ActionHandler(CreateTrainedModelAssignmentAction.INSTANCE, TransportCreateTrainedModelAssignmentAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(DeleteTrainedModelAssignmentAction.INSTANCE, TransportDeleteTrainedModelAssignmentAction.class)
|
new ActionHandler(DeleteTrainedModelAssignmentAction.INSTANCE, TransportDeleteTrainedModelAssignmentAction.class)
|
||||||
);
|
);
|
||||||
actionHandlers.add(
|
actionHandlers.add(
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
UpdateTrainedModelAssignmentRoutingInfoAction.INSTANCE,
|
UpdateTrainedModelAssignmentRoutingInfoAction.INSTANCE,
|
||||||
TransportUpdateTrainedModelAssignmentStateAction.class
|
TransportUpdateTrainedModelAssignmentStateAction.class
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
actionHandlers.add(new ActionHandler<>(CoordinatedInferenceAction.INSTANCE, TransportCoordinatedInferenceAction.class));
|
actionHandlers.add(new ActionHandler(CoordinatedInferenceAction.INSTANCE, TransportCoordinatedInferenceAction.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return actionHandlers;
|
return actionHandlers;
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.ml;
|
package org.elasticsearch.xpack.ml;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.TransportAction;
|
import org.elasticsearch.action.support.TransportAction;
|
||||||
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
|
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
|
||||||
|
@ -129,8 +127,8 @@ public class LocalStateMachineLearning extends LocalStateCompositeXPackPlugin {
|
||||||
public static class MockedRollupPlugin extends Plugin implements ActionPlugin {
|
public static class MockedRollupPlugin extends Plugin implements ActionPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Collections.singletonList(new ActionHandler<>(GetRollupIndexCapsAction.INSTANCE, MockedRollupIndexCapsTransport.class));
|
return Collections.singletonList(new ActionHandler(GetRollupIndexCapsAction.INSTANCE, MockedRollupIndexCapsTransport.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class MockedRollupIndexCapsTransport extends TransportAction<
|
public static class MockedRollupIndexCapsTransport extends TransportAction<
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.monitoring;
|
package org.elasticsearch.xpack.monitoring;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
|
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
|
||||||
|
@ -172,12 +170,12 @@ public class Monitoring extends Plugin implements ActionPlugin, ReloadablePlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.MONITORING, MonitoringUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.MONITORING, MonitoringUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.MONITORING, MonitoringInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.MONITORING, MonitoringInfoTransportAction.class);
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(MonitoringBulkAction.INSTANCE, TransportMonitoringBulkAction.class),
|
new ActionHandler(MonitoringBulkAction.INSTANCE, TransportMonitoringBulkAction.class),
|
||||||
new ActionHandler<>(MonitoringMigrateAlertsAction.INSTANCE, TransportMonitoringMigrateAlertsAction.class),
|
new ActionHandler(MonitoringMigrateAlertsAction.INSTANCE, TransportMonitoringMigrateAlertsAction.class),
|
||||||
usageAction,
|
usageAction,
|
||||||
infoAction
|
infoAction
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.monitoring;
|
package org.elasticsearch.xpack.monitoring;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.ActionType;
|
import org.elasticsearch.action.ActionType;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.HandledTransportAction;
|
import org.elasticsearch.action.support.HandledTransportAction;
|
||||||
|
@ -110,12 +108,12 @@ public class LocalStateMonitoring extends LocalStateCompositeXPackPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var actions = super.getActions();
|
var actions = super.getActions();
|
||||||
// ccr StatsCollector
|
// ccr StatsCollector
|
||||||
actions.add(new ActionHandler<>(CcrStatsAction.INSTANCE, TransportCcrStatsStubAction.class));
|
actions.add(new ActionHandler(CcrStatsAction.INSTANCE, TransportCcrStatsStubAction.class));
|
||||||
// For EnrichStatsCollector:
|
// For EnrichStatsCollector:
|
||||||
actions.add(new ActionHandler<>(EnrichStatsAction.INSTANCE, TransportEnrichStatsStubAction.class));
|
actions.add(new ActionHandler(EnrichStatsAction.INSTANCE, TransportEnrichStatsStubAction.class));
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@ import org.apache.lucene.index.SegmentInfo;
|
||||||
import org.apache.lucene.index.SegmentInfos;
|
import org.apache.lucene.index.SegmentInfos;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.Build;
|
import org.elasticsearch.Build;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||||
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
|
import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider;
|
||||||
|
@ -93,10 +91,10 @@ public class OldLuceneVersions extends Plugin implements IndexStorePlugin, Clust
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionPlugin.ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionPlugin.ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionPlugin.ActionHandler<>(XPackUsageFeatureAction.ARCHIVE, ArchiveUsageTransportAction.class),
|
new ActionPlugin.ActionHandler(XPackUsageFeatureAction.ARCHIVE, ArchiveUsageTransportAction.class),
|
||||||
new ActionPlugin.ActionHandler<>(XPackInfoFeatureAction.ARCHIVE, ArchiveInfoTransportAction.class)
|
new ActionPlugin.ActionHandler(XPackInfoFeatureAction.ARCHIVE, ArchiveInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@ package org.elasticsearch.xpack.profiling;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -184,14 +182,14 @@ public class ProfilingPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(GetStackTracesAction.INSTANCE, TransportGetStackTracesAction.class),
|
new ActionHandler(GetStackTracesAction.INSTANCE, TransportGetStackTracesAction.class),
|
||||||
new ActionHandler<>(GetFlamegraphAction.INSTANCE, TransportGetFlamegraphAction.class),
|
new ActionHandler(GetFlamegraphAction.INSTANCE, TransportGetFlamegraphAction.class),
|
||||||
new ActionHandler<>(GetTopNFunctionsAction.INSTANCE, TransportGetTopNFunctionsAction.class),
|
new ActionHandler(GetTopNFunctionsAction.INSTANCE, TransportGetTopNFunctionsAction.class),
|
||||||
new ActionHandler<>(GetStatusAction.INSTANCE, TransportGetStatusAction.class),
|
new ActionHandler(GetStatusAction.INSTANCE, TransportGetStatusAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.UNIVERSAL_PROFILING, ProfilingUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.UNIVERSAL_PROFILING, ProfilingUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.UNIVERSAL_PROFILING, ProfilingInfoTransportAction.class)
|
new ActionHandler(XPackInfoFeatureAction.UNIVERSAL_PROFILING, ProfilingInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.repositories.metering;
|
package org.elasticsearch.xpack.repositories.metering;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -35,10 +33,10 @@ import java.util.function.Supplier;
|
||||||
public final class RepositoriesMeteringPlugin extends Plugin implements ActionPlugin {
|
public final class RepositoriesMeteringPlugin extends Plugin implements ActionPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(RepositoriesMeteringAction.INSTANCE, TransportRepositoriesStatsAction.class),
|
new ActionHandler(RepositoriesMeteringAction.INSTANCE, TransportRepositoriesStatsAction.class),
|
||||||
new ActionHandler<>(ClearRepositoriesMeteringArchiveAction.INSTANCE, TransportClearRepositoriesStatsArchiveAction.class)
|
new ActionHandler(ClearRepositoriesMeteringArchiveAction.INSTANCE, TransportClearRepositoriesStatsArchiveAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.rollup;
|
package org.elasticsearch.xpack.rollup;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -115,18 +113,18 @@ public class Rollup extends Plugin implements ActionPlugin, PersistentTaskPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(RollupSearchAction.INSTANCE, TransportRollupSearchAction.class),
|
new ActionHandler(RollupSearchAction.INSTANCE, TransportRollupSearchAction.class),
|
||||||
new ActionHandler<>(PutRollupJobAction.INSTANCE, TransportPutRollupJobAction.class),
|
new ActionHandler(PutRollupJobAction.INSTANCE, TransportPutRollupJobAction.class),
|
||||||
new ActionHandler<>(StartRollupJobAction.INSTANCE, TransportStartRollupAction.class),
|
new ActionHandler(StartRollupJobAction.INSTANCE, TransportStartRollupAction.class),
|
||||||
new ActionHandler<>(StopRollupJobAction.INSTANCE, TransportStopRollupAction.class),
|
new ActionHandler(StopRollupJobAction.INSTANCE, TransportStopRollupAction.class),
|
||||||
new ActionHandler<>(DeleteRollupJobAction.INSTANCE, TransportDeleteRollupJobAction.class),
|
new ActionHandler(DeleteRollupJobAction.INSTANCE, TransportDeleteRollupJobAction.class),
|
||||||
new ActionHandler<>(GetRollupJobsAction.INSTANCE, TransportGetRollupJobAction.class),
|
new ActionHandler(GetRollupJobsAction.INSTANCE, TransportGetRollupJobAction.class),
|
||||||
new ActionHandler<>(GetRollupCapsAction.INSTANCE, TransportGetRollupCapsAction.class),
|
new ActionHandler(GetRollupCapsAction.INSTANCE, TransportGetRollupCapsAction.class),
|
||||||
new ActionHandler<>(GetRollupIndexCapsAction.INSTANCE, TransportGetRollupIndexCapsAction.class),
|
new ActionHandler(GetRollupIndexCapsAction.INSTANCE, TransportGetRollupIndexCapsAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.ROLLUP, RollupUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.ROLLUP, RollupUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.ROLLUP, RollupInfoTransportAction.class)
|
new ActionHandler(XPackInfoFeatureAction.ROLLUP, RollupInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@ import org.apache.lucene.store.BufferedIndexInput;
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.blobcache.BlobCacheMetrics;
|
import org.elasticsearch.blobcache.BlobCacheMetrics;
|
||||||
import org.elasticsearch.blobcache.shared.SharedBlobCacheService;
|
import org.elasticsearch.blobcache.shared.SharedBlobCacheService;
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
|
@ -482,17 +480,17 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(SearchableSnapshotsStatsAction.INSTANCE, TransportSearchableSnapshotsStatsAction.class),
|
new ActionHandler(SearchableSnapshotsStatsAction.INSTANCE, TransportSearchableSnapshotsStatsAction.class),
|
||||||
new ActionHandler<>(ClearSearchableSnapshotsCacheAction.INSTANCE, TransportClearSearchableSnapshotsCacheAction.class),
|
new ActionHandler(ClearSearchableSnapshotsCacheAction.INSTANCE, TransportClearSearchableSnapshotsCacheAction.class),
|
||||||
new ActionHandler<>(MountSearchableSnapshotAction.INSTANCE, TransportMountSearchableSnapshotAction.class),
|
new ActionHandler(MountSearchableSnapshotAction.INSTANCE, TransportMountSearchableSnapshotAction.class),
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.SEARCHABLE_SNAPSHOTS, SearchableSnapshotsUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.SEARCHABLE_SNAPSHOTS, SearchableSnapshotsUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.SEARCHABLE_SNAPSHOTS, SearchableSnapshotsInfoTransportAction.class),
|
new ActionHandler(XPackInfoFeatureAction.SEARCHABLE_SNAPSHOTS, SearchableSnapshotsInfoTransportAction.class),
|
||||||
new ActionHandler<>(TransportSearchableSnapshotCacheStoresAction.TYPE, TransportSearchableSnapshotCacheStoresAction.class),
|
new ActionHandler(TransportSearchableSnapshotCacheStoresAction.TYPE, TransportSearchableSnapshotCacheStoresAction.class),
|
||||||
new ActionHandler<>(FrozenCacheInfoAction.INSTANCE, FrozenCacheInfoAction.TransportAction.class),
|
new ActionHandler(FrozenCacheInfoAction.INSTANCE, FrozenCacheInfoAction.TransportAction.class),
|
||||||
new ActionHandler<>(FrozenCacheInfoNodeAction.INSTANCE, FrozenCacheInfoNodeAction.TransportAction.class),
|
new ActionHandler(FrozenCacheInfoNodeAction.INSTANCE, FrozenCacheInfoNodeAction.TransportAction.class),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
TransportSearchableSnapshotsNodeCachesStatsAction.TYPE,
|
TransportSearchableSnapshotsNodeCachesStatsAction.TYPE,
|
||||||
TransportSearchableSnapshotsNodeCachesStatsAction.class
|
TransportSearchableSnapshotsNodeCachesStatsAction.class
|
||||||
)
|
)
|
||||||
|
|
|
@ -20,7 +20,6 @@ import org.elasticsearch.ExceptionsHelper;
|
||||||
import org.elasticsearch.ResourceAlreadyExistsException;
|
import org.elasticsearch.ResourceAlreadyExistsException;
|
||||||
import org.elasticsearch.TransportVersion;
|
import org.elasticsearch.TransportVersion;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
import org.elasticsearch.action.ActionResponse;
|
||||||
import org.elasticsearch.action.support.ActionFilter;
|
import org.elasticsearch.action.support.ActionFilter;
|
||||||
import org.elasticsearch.action.support.DestructiveOperations;
|
import org.elasticsearch.action.support.DestructiveOperations;
|
||||||
|
@ -1582,80 +1581,80 @@ public class Security extends Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.SECURITY, SecurityUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.SECURITY, SecurityUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.SECURITY, SecurityInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.SECURITY, SecurityInfoTransportAction.class);
|
||||||
if (enabled == false) {
|
if (enabled == false) {
|
||||||
return Arrays.asList(usageAction, infoAction);
|
return Arrays.asList(usageAction, infoAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Stream.of(
|
return Stream.of(
|
||||||
new ActionHandler<>(ClearRealmCacheAction.INSTANCE, TransportClearRealmCacheAction.class),
|
new ActionHandler(ClearRealmCacheAction.INSTANCE, TransportClearRealmCacheAction.class),
|
||||||
new ActionHandler<>(ClearRolesCacheAction.INSTANCE, TransportClearRolesCacheAction.class),
|
new ActionHandler(ClearRolesCacheAction.INSTANCE, TransportClearRolesCacheAction.class),
|
||||||
new ActionHandler<>(ClearPrivilegesCacheAction.INSTANCE, TransportClearPrivilegesCacheAction.class),
|
new ActionHandler(ClearPrivilegesCacheAction.INSTANCE, TransportClearPrivilegesCacheAction.class),
|
||||||
new ActionHandler<>(ClearSecurityCacheAction.INSTANCE, TransportClearSecurityCacheAction.class),
|
new ActionHandler(ClearSecurityCacheAction.INSTANCE, TransportClearSecurityCacheAction.class),
|
||||||
new ActionHandler<>(GetUsersAction.INSTANCE, TransportGetUsersAction.class),
|
new ActionHandler(GetUsersAction.INSTANCE, TransportGetUsersAction.class),
|
||||||
new ActionHandler<>(ActionTypes.QUERY_USER_ACTION, TransportQueryUserAction.class),
|
new ActionHandler(ActionTypes.QUERY_USER_ACTION, TransportQueryUserAction.class),
|
||||||
new ActionHandler<>(PutUserAction.INSTANCE, TransportPutUserAction.class),
|
new ActionHandler(PutUserAction.INSTANCE, TransportPutUserAction.class),
|
||||||
new ActionHandler<>(DeleteUserAction.INSTANCE, TransportDeleteUserAction.class),
|
new ActionHandler(DeleteUserAction.INSTANCE, TransportDeleteUserAction.class),
|
||||||
new ActionHandler<>(GetRolesAction.INSTANCE, TransportGetRolesAction.class),
|
new ActionHandler(GetRolesAction.INSTANCE, TransportGetRolesAction.class),
|
||||||
new ActionHandler<>(ActionTypes.QUERY_ROLE_ACTION, TransportQueryRoleAction.class),
|
new ActionHandler(ActionTypes.QUERY_ROLE_ACTION, TransportQueryRoleAction.class),
|
||||||
new ActionHandler<>(PutRoleAction.INSTANCE, TransportPutRoleAction.class),
|
new ActionHandler(PutRoleAction.INSTANCE, TransportPutRoleAction.class),
|
||||||
new ActionHandler<>(ActionTypes.BULK_PUT_ROLES, TransportBulkPutRolesAction.class),
|
new ActionHandler(ActionTypes.BULK_PUT_ROLES, TransportBulkPutRolesAction.class),
|
||||||
new ActionHandler<>(ActionTypes.BULK_DELETE_ROLES, TransportBulkDeleteRolesAction.class),
|
new ActionHandler(ActionTypes.BULK_DELETE_ROLES, TransportBulkDeleteRolesAction.class),
|
||||||
new ActionHandler<>(DeleteRoleAction.INSTANCE, TransportDeleteRoleAction.class),
|
new ActionHandler(DeleteRoleAction.INSTANCE, TransportDeleteRoleAction.class),
|
||||||
new ActionHandler<>(TransportChangePasswordAction.TYPE, TransportChangePasswordAction.class),
|
new ActionHandler(TransportChangePasswordAction.TYPE, TransportChangePasswordAction.class),
|
||||||
new ActionHandler<>(AuthenticateAction.INSTANCE, TransportAuthenticateAction.class),
|
new ActionHandler(AuthenticateAction.INSTANCE, TransportAuthenticateAction.class),
|
||||||
new ActionHandler<>(TransportSetEnabledAction.TYPE, TransportSetEnabledAction.class),
|
new ActionHandler(TransportSetEnabledAction.TYPE, TransportSetEnabledAction.class),
|
||||||
new ActionHandler<>(HasPrivilegesAction.INSTANCE, TransportHasPrivilegesAction.class),
|
new ActionHandler(HasPrivilegesAction.INSTANCE, TransportHasPrivilegesAction.class),
|
||||||
new ActionHandler<>(GetUserPrivilegesAction.INSTANCE, TransportGetUserPrivilegesAction.class),
|
new ActionHandler(GetUserPrivilegesAction.INSTANCE, TransportGetUserPrivilegesAction.class),
|
||||||
new ActionHandler<>(GetRoleMappingsAction.INSTANCE, TransportGetRoleMappingsAction.class),
|
new ActionHandler(GetRoleMappingsAction.INSTANCE, TransportGetRoleMappingsAction.class),
|
||||||
new ActionHandler<>(PutRoleMappingAction.INSTANCE, TransportPutRoleMappingAction.class),
|
new ActionHandler(PutRoleMappingAction.INSTANCE, TransportPutRoleMappingAction.class),
|
||||||
new ActionHandler<>(DeleteRoleMappingAction.INSTANCE, TransportDeleteRoleMappingAction.class),
|
new ActionHandler(DeleteRoleMappingAction.INSTANCE, TransportDeleteRoleMappingAction.class),
|
||||||
new ActionHandler<>(CreateTokenAction.INSTANCE, TransportCreateTokenAction.class),
|
new ActionHandler(CreateTokenAction.INSTANCE, TransportCreateTokenAction.class),
|
||||||
new ActionHandler<>(InvalidateTokenAction.INSTANCE, TransportInvalidateTokenAction.class),
|
new ActionHandler(InvalidateTokenAction.INSTANCE, TransportInvalidateTokenAction.class),
|
||||||
new ActionHandler<>(GetCertificateInfoAction.INSTANCE, TransportGetCertificateInfoAction.class),
|
new ActionHandler(GetCertificateInfoAction.INSTANCE, TransportGetCertificateInfoAction.class),
|
||||||
new ActionHandler<>(RefreshTokenAction.INSTANCE, TransportRefreshTokenAction.class),
|
new ActionHandler(RefreshTokenAction.INSTANCE, TransportRefreshTokenAction.class),
|
||||||
new ActionHandler<>(SamlPrepareAuthenticationAction.INSTANCE, TransportSamlPrepareAuthenticationAction.class),
|
new ActionHandler(SamlPrepareAuthenticationAction.INSTANCE, TransportSamlPrepareAuthenticationAction.class),
|
||||||
new ActionHandler<>(SamlAuthenticateAction.INSTANCE, TransportSamlAuthenticateAction.class),
|
new ActionHandler(SamlAuthenticateAction.INSTANCE, TransportSamlAuthenticateAction.class),
|
||||||
new ActionHandler<>(SamlLogoutAction.INSTANCE, TransportSamlLogoutAction.class),
|
new ActionHandler(SamlLogoutAction.INSTANCE, TransportSamlLogoutAction.class),
|
||||||
new ActionHandler<>(SamlInvalidateSessionAction.INSTANCE, TransportSamlInvalidateSessionAction.class),
|
new ActionHandler(SamlInvalidateSessionAction.INSTANCE, TransportSamlInvalidateSessionAction.class),
|
||||||
new ActionHandler<>(TransportSamlCompleteLogoutAction.TYPE, TransportSamlCompleteLogoutAction.class),
|
new ActionHandler(TransportSamlCompleteLogoutAction.TYPE, TransportSamlCompleteLogoutAction.class),
|
||||||
new ActionHandler<>(SamlSpMetadataAction.INSTANCE, TransportSamlSpMetadataAction.class),
|
new ActionHandler(SamlSpMetadataAction.INSTANCE, TransportSamlSpMetadataAction.class),
|
||||||
new ActionHandler<>(OpenIdConnectPrepareAuthenticationAction.INSTANCE, TransportOpenIdConnectPrepareAuthenticationAction.class),
|
new ActionHandler(OpenIdConnectPrepareAuthenticationAction.INSTANCE, TransportOpenIdConnectPrepareAuthenticationAction.class),
|
||||||
new ActionHandler<>(OpenIdConnectAuthenticateAction.INSTANCE, TransportOpenIdConnectAuthenticateAction.class),
|
new ActionHandler(OpenIdConnectAuthenticateAction.INSTANCE, TransportOpenIdConnectAuthenticateAction.class),
|
||||||
new ActionHandler<>(OpenIdConnectLogoutAction.INSTANCE, TransportOpenIdConnectLogoutAction.class),
|
new ActionHandler(OpenIdConnectLogoutAction.INSTANCE, TransportOpenIdConnectLogoutAction.class),
|
||||||
new ActionHandler<>(GetBuiltinPrivilegesAction.INSTANCE, TransportGetBuiltinPrivilegesAction.class),
|
new ActionHandler(GetBuiltinPrivilegesAction.INSTANCE, TransportGetBuiltinPrivilegesAction.class),
|
||||||
new ActionHandler<>(GetPrivilegesAction.INSTANCE, TransportGetPrivilegesAction.class),
|
new ActionHandler(GetPrivilegesAction.INSTANCE, TransportGetPrivilegesAction.class),
|
||||||
new ActionHandler<>(PutPrivilegesAction.INSTANCE, TransportPutPrivilegesAction.class),
|
new ActionHandler(PutPrivilegesAction.INSTANCE, TransportPutPrivilegesAction.class),
|
||||||
new ActionHandler<>(DeletePrivilegesAction.INSTANCE, TransportDeletePrivilegesAction.class),
|
new ActionHandler(DeletePrivilegesAction.INSTANCE, TransportDeletePrivilegesAction.class),
|
||||||
new ActionHandler<>(CreateApiKeyAction.INSTANCE, TransportCreateApiKeyAction.class),
|
new ActionHandler(CreateApiKeyAction.INSTANCE, TransportCreateApiKeyAction.class),
|
||||||
new ActionHandler<>(CreateCrossClusterApiKeyAction.INSTANCE, TransportCreateCrossClusterApiKeyAction.class),
|
new ActionHandler(CreateCrossClusterApiKeyAction.INSTANCE, TransportCreateCrossClusterApiKeyAction.class),
|
||||||
new ActionHandler<>(GrantApiKeyAction.INSTANCE, TransportGrantApiKeyAction.class),
|
new ActionHandler(GrantApiKeyAction.INSTANCE, TransportGrantApiKeyAction.class),
|
||||||
new ActionHandler<>(InvalidateApiKeyAction.INSTANCE, TransportInvalidateApiKeyAction.class),
|
new ActionHandler(InvalidateApiKeyAction.INSTANCE, TransportInvalidateApiKeyAction.class),
|
||||||
new ActionHandler<>(GetApiKeyAction.INSTANCE, TransportGetApiKeyAction.class),
|
new ActionHandler(GetApiKeyAction.INSTANCE, TransportGetApiKeyAction.class),
|
||||||
new ActionHandler<>(QueryApiKeyAction.INSTANCE, TransportQueryApiKeyAction.class),
|
new ActionHandler(QueryApiKeyAction.INSTANCE, TransportQueryApiKeyAction.class),
|
||||||
new ActionHandler<>(UpdateApiKeyAction.INSTANCE, TransportUpdateApiKeyAction.class),
|
new ActionHandler(UpdateApiKeyAction.INSTANCE, TransportUpdateApiKeyAction.class),
|
||||||
new ActionHandler<>(BulkUpdateApiKeyAction.INSTANCE, TransportBulkUpdateApiKeyAction.class),
|
new ActionHandler(BulkUpdateApiKeyAction.INSTANCE, TransportBulkUpdateApiKeyAction.class),
|
||||||
new ActionHandler<>(UpdateCrossClusterApiKeyAction.INSTANCE, TransportUpdateCrossClusterApiKeyAction.class),
|
new ActionHandler(UpdateCrossClusterApiKeyAction.INSTANCE, TransportUpdateCrossClusterApiKeyAction.class),
|
||||||
new ActionHandler<>(DelegatePkiAuthenticationAction.INSTANCE, TransportDelegatePkiAuthenticationAction.class),
|
new ActionHandler(DelegatePkiAuthenticationAction.INSTANCE, TransportDelegatePkiAuthenticationAction.class),
|
||||||
new ActionHandler<>(CreateServiceAccountTokenAction.INSTANCE, TransportCreateServiceAccountTokenAction.class),
|
new ActionHandler(CreateServiceAccountTokenAction.INSTANCE, TransportCreateServiceAccountTokenAction.class),
|
||||||
new ActionHandler<>(DeleteServiceAccountTokenAction.INSTANCE, TransportDeleteServiceAccountTokenAction.class),
|
new ActionHandler(DeleteServiceAccountTokenAction.INSTANCE, TransportDeleteServiceAccountTokenAction.class),
|
||||||
new ActionHandler<>(GetServiceAccountCredentialsAction.INSTANCE, TransportGetServiceAccountCredentialsAction.class),
|
new ActionHandler(GetServiceAccountCredentialsAction.INSTANCE, TransportGetServiceAccountCredentialsAction.class),
|
||||||
new ActionHandler<>(GetServiceAccountNodesCredentialsAction.INSTANCE, TransportGetServiceAccountNodesCredentialsAction.class),
|
new ActionHandler(GetServiceAccountNodesCredentialsAction.INSTANCE, TransportGetServiceAccountNodesCredentialsAction.class),
|
||||||
new ActionHandler<>(GetServiceAccountAction.INSTANCE, TransportGetServiceAccountAction.class),
|
new ActionHandler(GetServiceAccountAction.INSTANCE, TransportGetServiceAccountAction.class),
|
||||||
new ActionHandler<>(KibanaEnrollmentAction.INSTANCE, TransportKibanaEnrollmentAction.class),
|
new ActionHandler(KibanaEnrollmentAction.INSTANCE, TransportKibanaEnrollmentAction.class),
|
||||||
new ActionHandler<>(NodeEnrollmentAction.INSTANCE, TransportNodeEnrollmentAction.class),
|
new ActionHandler(NodeEnrollmentAction.INSTANCE, TransportNodeEnrollmentAction.class),
|
||||||
new ActionHandler<>(ProfileHasPrivilegesAction.INSTANCE, TransportProfileHasPrivilegesAction.class),
|
new ActionHandler(ProfileHasPrivilegesAction.INSTANCE, TransportProfileHasPrivilegesAction.class),
|
||||||
new ActionHandler<>(GetProfilesAction.INSTANCE, TransportGetProfilesAction.class),
|
new ActionHandler(GetProfilesAction.INSTANCE, TransportGetProfilesAction.class),
|
||||||
new ActionHandler<>(ActivateProfileAction.INSTANCE, TransportActivateProfileAction.class),
|
new ActionHandler(ActivateProfileAction.INSTANCE, TransportActivateProfileAction.class),
|
||||||
new ActionHandler<>(UpdateProfileDataAction.INSTANCE, TransportUpdateProfileDataAction.class),
|
new ActionHandler(UpdateProfileDataAction.INSTANCE, TransportUpdateProfileDataAction.class),
|
||||||
new ActionHandler<>(SuggestProfilesAction.INSTANCE, TransportSuggestProfilesAction.class),
|
new ActionHandler(SuggestProfilesAction.INSTANCE, TransportSuggestProfilesAction.class),
|
||||||
new ActionHandler<>(SetProfileEnabledAction.INSTANCE, TransportSetProfileEnabledAction.class),
|
new ActionHandler(SetProfileEnabledAction.INSTANCE, TransportSetProfileEnabledAction.class),
|
||||||
new ActionHandler<>(GetSecuritySettingsAction.INSTANCE, TransportGetSecuritySettingsAction.class),
|
new ActionHandler(GetSecuritySettingsAction.INSTANCE, TransportGetSecuritySettingsAction.class),
|
||||||
new ActionHandler<>(UpdateSecuritySettingsAction.INSTANCE, TransportUpdateSecuritySettingsAction.class),
|
new ActionHandler(UpdateSecuritySettingsAction.INSTANCE, TransportUpdateSecuritySettingsAction.class),
|
||||||
new ActionHandler<>(ActionTypes.RELOAD_REMOTE_CLUSTER_CREDENTIALS_ACTION, TransportReloadRemoteClusterCredentialsAction.class),
|
new ActionHandler(ActionTypes.RELOAD_REMOTE_CLUSTER_CREDENTIALS_ACTION, TransportReloadRemoteClusterCredentialsAction.class),
|
||||||
new ActionHandler<>(UpdateIndexMigrationVersionAction.INSTANCE, UpdateIndexMigrationVersionAction.TransportAction.class),
|
new ActionHandler(UpdateIndexMigrationVersionAction.INSTANCE, UpdateIndexMigrationVersionAction.TransportAction.class),
|
||||||
usageAction,
|
usageAction,
|
||||||
infoAction
|
infoAction
|
||||||
).filter(Objects::nonNull).toList();
|
).filter(Objects::nonNull).toList();
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.shutdown;
|
package org.elasticsearch.xpack.shutdown;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -39,19 +36,10 @@ public class ShutdownPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
ActionHandler<PutShutdownNodeAction.Request, AcknowledgedResponse> putShutdown = new ActionHandler<>(
|
ActionHandler putShutdown = new ActionHandler(PutShutdownNodeAction.INSTANCE, TransportPutShutdownNodeAction.class);
|
||||||
PutShutdownNodeAction.INSTANCE,
|
ActionHandler deleteShutdown = new ActionHandler(DeleteShutdownNodeAction.INSTANCE, TransportDeleteShutdownNodeAction.class);
|
||||||
TransportPutShutdownNodeAction.class
|
ActionHandler getStatus = new ActionHandler(GetShutdownStatusAction.INSTANCE, TransportGetShutdownStatusAction.class);
|
||||||
);
|
|
||||||
ActionHandler<DeleteShutdownNodeAction.Request, AcknowledgedResponse> deleteShutdown = new ActionHandler<>(
|
|
||||||
DeleteShutdownNodeAction.INSTANCE,
|
|
||||||
TransportDeleteShutdownNodeAction.class
|
|
||||||
);
|
|
||||||
ActionHandler<GetShutdownStatusAction.Request, GetShutdownStatusAction.Response> getStatus = new ActionHandler<>(
|
|
||||||
GetShutdownStatusAction.INSTANCE,
|
|
||||||
TransportGetShutdownStatusAction.class
|
|
||||||
);
|
|
||||||
return Arrays.asList(putShutdown, deleteShutdown, getStatus);
|
return Arrays.asList(putShutdown, deleteShutdown, getStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@ package org.elasticsearch.xpack.slm;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.client.internal.OriginSettingClient;
|
import org.elasticsearch.client.internal.OriginSettingClient;
|
||||||
import org.elasticsearch.cluster.ClusterState;
|
import org.elasticsearch.cluster.ClusterState;
|
||||||
|
@ -210,25 +208,25 @@ public class SnapshotLifecycle extends Plugin implements ActionPlugin, HealthPlu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var slmUsageAction = new ActionHandler<>(XPackUsageFeatureAction.SNAPSHOT_LIFECYCLE, SLMUsageTransportAction.class);
|
var slmUsageAction = new ActionHandler(XPackUsageFeatureAction.SNAPSHOT_LIFECYCLE, SLMUsageTransportAction.class);
|
||||||
var slmInfoAction = new ActionHandler<>(XPackInfoFeatureAction.SNAPSHOT_LIFECYCLE, SLMInfoTransportAction.class);
|
var slmInfoAction = new ActionHandler(XPackInfoFeatureAction.SNAPSHOT_LIFECYCLE, SLMInfoTransportAction.class);
|
||||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
List<ActionHandler> actions = new ArrayList<>();
|
||||||
actions.add(slmUsageAction);
|
actions.add(slmUsageAction);
|
||||||
actions.add(slmInfoAction);
|
actions.add(slmInfoAction);
|
||||||
actions.addAll(
|
actions.addAll(
|
||||||
Arrays.asList(
|
Arrays.asList(
|
||||||
// add SLM actions
|
// add SLM actions
|
||||||
new ActionHandler<>(PutSnapshotLifecycleAction.INSTANCE, TransportPutSnapshotLifecycleAction.class),
|
new ActionHandler(PutSnapshotLifecycleAction.INSTANCE, TransportPutSnapshotLifecycleAction.class),
|
||||||
new ActionHandler<>(DeleteSnapshotLifecycleAction.INSTANCE, TransportDeleteSnapshotLifecycleAction.class),
|
new ActionHandler(DeleteSnapshotLifecycleAction.INSTANCE, TransportDeleteSnapshotLifecycleAction.class),
|
||||||
new ActionHandler<>(GetSnapshotLifecycleAction.INSTANCE, TransportGetSnapshotLifecycleAction.class),
|
new ActionHandler(GetSnapshotLifecycleAction.INSTANCE, TransportGetSnapshotLifecycleAction.class),
|
||||||
new ActionHandler<>(ExecuteSnapshotLifecycleAction.INSTANCE, TransportExecuteSnapshotLifecycleAction.class),
|
new ActionHandler(ExecuteSnapshotLifecycleAction.INSTANCE, TransportExecuteSnapshotLifecycleAction.class),
|
||||||
new ActionHandler<>(GetSnapshotLifecycleStatsAction.INSTANCE, TransportGetSnapshotLifecycleStatsAction.class),
|
new ActionHandler(GetSnapshotLifecycleStatsAction.INSTANCE, TransportGetSnapshotLifecycleStatsAction.class),
|
||||||
new ActionHandler<>(ExecuteSnapshotRetentionAction.INSTANCE, TransportExecuteSnapshotRetentionAction.class),
|
new ActionHandler(ExecuteSnapshotRetentionAction.INSTANCE, TransportExecuteSnapshotRetentionAction.class),
|
||||||
new ActionHandler<>(TransportSLMGetExpiredSnapshotsAction.INSTANCE, TransportSLMGetExpiredSnapshotsAction.class),
|
new ActionHandler(TransportSLMGetExpiredSnapshotsAction.INSTANCE, TransportSLMGetExpiredSnapshotsAction.class),
|
||||||
new ActionHandler<>(StartSLMAction.INSTANCE, TransportStartSLMAction.class),
|
new ActionHandler(StartSLMAction.INSTANCE, TransportStartSLMAction.class),
|
||||||
new ActionHandler<>(StopSLMAction.INSTANCE, TransportStopSLMAction.class),
|
new ActionHandler(StopSLMAction.INSTANCE, TransportStopSLMAction.class),
|
||||||
new ActionHandler<>(GetSLMStatusAction.INSTANCE, TransportGetSLMStatusAction.class)
|
new ActionHandler(GetSLMStatusAction.INSTANCE, TransportGetSLMStatusAction.class)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return actions;
|
return actions;
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.repositories.blobstore.testkit;
|
package org.elasticsearch.repositories.blobstore.testkit;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -38,10 +36,10 @@ import java.util.function.Supplier;
|
||||||
public class SnapshotRepositoryTestKit extends Plugin implements ActionPlugin {
|
public class SnapshotRepositoryTestKit extends Plugin implements ActionPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionHandler<>(RepositoryAnalyzeAction.INSTANCE, RepositoryAnalyzeAction.class),
|
new ActionHandler(RepositoryAnalyzeAction.INSTANCE, RepositoryAnalyzeAction.class),
|
||||||
new ActionHandler<>(
|
new ActionHandler(
|
||||||
TransportRepositoryVerifyIntegrityCoordinationAction.INSTANCE,
|
TransportRepositoryVerifyIntegrityCoordinationAction.INSTANCE,
|
||||||
TransportRepositoryVerifyIntegrityCoordinationAction.class
|
TransportRepositoryVerifyIntegrityCoordinationAction.class
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
package org.elasticsearch.xpack.spatial;
|
package org.elasticsearch.xpack.spatial;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.common.geo.GeoFormatterFactory;
|
import org.elasticsearch.common.geo.GeoFormatterFactory;
|
||||||
import org.elasticsearch.geometry.Geometry;
|
import org.elasticsearch.geometry.Geometry;
|
||||||
import org.elasticsearch.index.mapper.Mapper;
|
import org.elasticsearch.index.mapper.Mapper;
|
||||||
|
@ -126,11 +124,11 @@ public class SpatialPlugin extends Plugin implements ActionPlugin, MapperPlugin,
|
||||||
private final SetOnce<GeoFormatterFactory<Geometry>> geoFormatterFactory = new SetOnce<>();
|
private final SetOnce<GeoFormatterFactory<Geometry>> geoFormatterFactory = new SetOnce<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionPlugin.ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionPlugin.ActionHandler> getActions() {
|
||||||
return List.of(
|
return List.of(
|
||||||
new ActionPlugin.ActionHandler<>(XPackUsageFeatureAction.SPATIAL, SpatialUsageTransportAction.class),
|
new ActionPlugin.ActionHandler(XPackUsageFeatureAction.SPATIAL, SpatialUsageTransportAction.class),
|
||||||
new ActionPlugin.ActionHandler<>(XPackInfoFeatureAction.SPATIAL, SpatialInfoTransportAction.class),
|
new ActionPlugin.ActionHandler(XPackInfoFeatureAction.SPATIAL, SpatialInfoTransportAction.class),
|
||||||
new ActionPlugin.ActionHandler<>(SpatialStatsAction.INSTANCE, SpatialStatsTransportAction.class)
|
new ActionPlugin.ActionHandler(SpatialStatsAction.INSTANCE, SpatialStatsTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.sql.plugin;
|
package org.elasticsearch.xpack.sql.plugin;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.client.internal.Client;
|
import org.elasticsearch.client.internal.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
|
@ -133,17 +131,17 @@ public class SqlPlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.SQL, SqlUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.SQL, SqlUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.SQL, SqlInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.SQL, SqlInfoTransportAction.class);
|
||||||
|
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(SqlQueryAction.INSTANCE, TransportSqlQueryAction.class),
|
new ActionHandler(SqlQueryAction.INSTANCE, TransportSqlQueryAction.class),
|
||||||
new ActionHandler<>(SqlTranslateAction.INSTANCE, TransportSqlTranslateAction.class),
|
new ActionHandler(SqlTranslateAction.INSTANCE, TransportSqlTranslateAction.class),
|
||||||
new ActionHandler<>(SqlClearCursorAction.INSTANCE, TransportSqlClearCursorAction.class),
|
new ActionHandler(SqlClearCursorAction.INSTANCE, TransportSqlClearCursorAction.class),
|
||||||
new ActionHandler<>(SqlStatsAction.INSTANCE, TransportSqlStatsAction.class),
|
new ActionHandler(SqlStatsAction.INSTANCE, TransportSqlStatsAction.class),
|
||||||
new ActionHandler<>(SqlAsyncGetResultsAction.INSTANCE, TransportSqlAsyncGetResultsAction.class),
|
new ActionHandler(SqlAsyncGetResultsAction.INSTANCE, TransportSqlAsyncGetResultsAction.class),
|
||||||
new ActionHandler<>(SqlAsyncGetStatusAction.INSTANCE, TransportSqlAsyncGetStatusAction.class),
|
new ActionHandler(SqlAsyncGetStatusAction.INSTANCE, TransportSqlAsyncGetStatusAction.class),
|
||||||
usageAction,
|
usageAction,
|
||||||
infoAction
|
infoAction
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.textstructure;
|
package org.elasticsearch.xpack.textstructure;
|
||||||
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
|
@ -68,12 +66,12 @@ public class TextStructurePlugin extends Plugin implements ActionPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(FindFieldStructureAction.INSTANCE, TransportFindFieldStructureAction.class),
|
new ActionHandler(FindFieldStructureAction.INSTANCE, TransportFindFieldStructureAction.class),
|
||||||
new ActionHandler<>(FindMessageStructureAction.INSTANCE, TransportFindMessageStructureAction.class),
|
new ActionHandler(FindMessageStructureAction.INSTANCE, TransportFindMessageStructureAction.class),
|
||||||
new ActionHandler<>(FindStructureAction.INSTANCE, TransportFindStructureAction.class),
|
new ActionHandler(FindStructureAction.INSTANCE, TransportFindStructureAction.class),
|
||||||
new ActionHandler<>(TestGrokPatternAction.INSTANCE, TransportTestGrokPatternAction.class)
|
new ActionHandler(TestGrokPatternAction.INSTANCE, TransportTestGrokPatternAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,6 @@ import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.ElasticsearchStatusException;
|
import org.elasticsearch.ElasticsearchStatusException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
||||||
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse;
|
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse;
|
||||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||||
|
@ -257,32 +255,32 @@ public class Transform extends Plugin implements SystemIndexPlugin, PersistentTa
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
|
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(PutTransformAction.INSTANCE, TransportPutTransformAction.class),
|
new ActionHandler(PutTransformAction.INSTANCE, TransportPutTransformAction.class),
|
||||||
new ActionHandler<>(StartTransformAction.INSTANCE, TransportStartTransformAction.class),
|
new ActionHandler(StartTransformAction.INSTANCE, TransportStartTransformAction.class),
|
||||||
new ActionHandler<>(StopTransformAction.INSTANCE, TransportStopTransformAction.class),
|
new ActionHandler(StopTransformAction.INSTANCE, TransportStopTransformAction.class),
|
||||||
new ActionHandler<>(DeleteTransformAction.INSTANCE, TransportDeleteTransformAction.class),
|
new ActionHandler(DeleteTransformAction.INSTANCE, TransportDeleteTransformAction.class),
|
||||||
new ActionHandler<>(GetTransformAction.INSTANCE, TransportGetTransformAction.class),
|
new ActionHandler(GetTransformAction.INSTANCE, TransportGetTransformAction.class),
|
||||||
new ActionHandler<>(GetTransformStatsAction.INSTANCE, TransportGetTransformStatsAction.class),
|
new ActionHandler(GetTransformStatsAction.INSTANCE, TransportGetTransformStatsAction.class),
|
||||||
new ActionHandler<>(PreviewTransformAction.INSTANCE, TransportPreviewTransformAction.class),
|
new ActionHandler(PreviewTransformAction.INSTANCE, TransportPreviewTransformAction.class),
|
||||||
new ActionHandler<>(UpdateTransformAction.INSTANCE, TransportUpdateTransformAction.class),
|
new ActionHandler(UpdateTransformAction.INSTANCE, TransportUpdateTransformAction.class),
|
||||||
new ActionHandler<>(SetResetModeAction.INSTANCE, TransportSetTransformResetModeAction.class),
|
new ActionHandler(SetResetModeAction.INSTANCE, TransportSetTransformResetModeAction.class),
|
||||||
new ActionHandler<>(UpgradeTransformsAction.INSTANCE, TransportUpgradeTransformsAction.class),
|
new ActionHandler(UpgradeTransformsAction.INSTANCE, TransportUpgradeTransformsAction.class),
|
||||||
new ActionHandler<>(ResetTransformAction.INSTANCE, TransportResetTransformAction.class),
|
new ActionHandler(ResetTransformAction.INSTANCE, TransportResetTransformAction.class),
|
||||||
new ActionHandler<>(ScheduleNowTransformAction.INSTANCE, TransportScheduleNowTransformAction.class),
|
new ActionHandler(ScheduleNowTransformAction.INSTANCE, TransportScheduleNowTransformAction.class),
|
||||||
new ActionHandler<>(GetTransformNodeStatsAction.INSTANCE, TransportGetTransformNodeStatsAction.class),
|
new ActionHandler(GetTransformNodeStatsAction.INSTANCE, TransportGetTransformNodeStatsAction.class),
|
||||||
new ActionHandler<>(SetTransformUpgradeModeAction.INSTANCE, TransportSetTransformUpgradeModeAction.class),
|
new ActionHandler(SetTransformUpgradeModeAction.INSTANCE, TransportSetTransformUpgradeModeAction.class),
|
||||||
|
|
||||||
// internal, no rest endpoint
|
// internal, no rest endpoint
|
||||||
new ActionHandler<>(ValidateTransformAction.INSTANCE, TransportValidateTransformAction.class),
|
new ActionHandler(ValidateTransformAction.INSTANCE, TransportValidateTransformAction.class),
|
||||||
new ActionHandler<>(GetCheckpointAction.INSTANCE, TransportGetCheckpointAction.class),
|
new ActionHandler(GetCheckpointAction.INSTANCE, TransportGetCheckpointAction.class),
|
||||||
new ActionHandler<>(GetCheckpointNodeAction.INSTANCE, TransportGetCheckpointNodeAction.class),
|
new ActionHandler(GetCheckpointNodeAction.INSTANCE, TransportGetCheckpointNodeAction.class),
|
||||||
|
|
||||||
// usage and info
|
// usage and info
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.TRANSFORM, TransformUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.TRANSFORM, TransformUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.TRANSFORM, TransformInfoTransportAction.class)
|
new ActionHandler(XPackInfoFeatureAction.TRANSFORM, TransformInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@ package org.elasticsearch.cluster.coordination.votingonly;
|
||||||
|
|
||||||
import org.apache.lucene.util.SetOnce;
|
import org.apache.lucene.util.SetOnce;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
|
import org.elasticsearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
|
||||||
import org.elasticsearch.cluster.coordination.CoordinationState.VoteCollection;
|
import org.elasticsearch.cluster.coordination.CoordinationState.VoteCollection;
|
||||||
import org.elasticsearch.cluster.coordination.ElectionStrategy;
|
import org.elasticsearch.cluster.coordination.ElectionStrategy;
|
||||||
|
@ -82,10 +80,10 @@ public class VotingOnlyNodePlugin extends Plugin implements ClusterCoordinationP
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(XPackUsageFeatureAction.VOTING_ONLY, VotingOnlyUsageTransportAction.class),
|
new ActionHandler(XPackUsageFeatureAction.VOTING_ONLY, VotingOnlyUsageTransportAction.class),
|
||||||
new ActionHandler<>(XPackInfoFeatureAction.VOTING_ONLY, VotingOnlyInfoTransportAction.class)
|
new ActionHandler(XPackInfoFeatureAction.VOTING_ONLY, VotingOnlyInfoTransportAction.class)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@ package org.elasticsearch.xpack.watcher;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.ActionRequest;
|
|
||||||
import org.elasticsearch.action.ActionResponse;
|
|
||||||
import org.elasticsearch.action.bulk.BulkItemResponse;
|
import org.elasticsearch.action.bulk.BulkItemResponse;
|
||||||
import org.elasticsearch.action.bulk.BulkProcessor2;
|
import org.elasticsearch.action.bulk.BulkProcessor2;
|
||||||
import org.elasticsearch.action.bulk.BulkRequest;
|
import org.elasticsearch.action.bulk.BulkRequest;
|
||||||
|
@ -681,24 +679,24 @@ public class Watcher extends Plugin implements SystemIndexPlugin, ScriptPlugin,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
public List<ActionHandler> getActions() {
|
||||||
var usageAction = new ActionHandler<>(XPackUsageFeatureAction.WATCHER, WatcherUsageTransportAction.class);
|
var usageAction = new ActionHandler(XPackUsageFeatureAction.WATCHER, WatcherUsageTransportAction.class);
|
||||||
var infoAction = new ActionHandler<>(XPackInfoFeatureAction.WATCHER, WatcherInfoTransportAction.class);
|
var infoAction = new ActionHandler(XPackInfoFeatureAction.WATCHER, WatcherInfoTransportAction.class);
|
||||||
if (false == enabled) {
|
if (false == enabled) {
|
||||||
return Arrays.asList(usageAction, infoAction);
|
return Arrays.asList(usageAction, infoAction);
|
||||||
}
|
}
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new ActionHandler<>(PutWatchAction.INSTANCE, TransportPutWatchAction.class),
|
new ActionHandler(PutWatchAction.INSTANCE, TransportPutWatchAction.class),
|
||||||
new ActionHandler<>(DeleteWatchAction.INSTANCE, TransportDeleteWatchAction.class),
|
new ActionHandler(DeleteWatchAction.INSTANCE, TransportDeleteWatchAction.class),
|
||||||
new ActionHandler<>(GetWatchAction.INSTANCE, TransportGetWatchAction.class),
|
new ActionHandler(GetWatchAction.INSTANCE, TransportGetWatchAction.class),
|
||||||
new ActionHandler<>(WatcherStatsAction.INSTANCE, TransportWatcherStatsAction.class),
|
new ActionHandler(WatcherStatsAction.INSTANCE, TransportWatcherStatsAction.class),
|
||||||
new ActionHandler<>(AckWatchAction.INSTANCE, TransportAckWatchAction.class),
|
new ActionHandler(AckWatchAction.INSTANCE, TransportAckWatchAction.class),
|
||||||
new ActionHandler<>(ActivateWatchAction.INSTANCE, TransportActivateWatchAction.class),
|
new ActionHandler(ActivateWatchAction.INSTANCE, TransportActivateWatchAction.class),
|
||||||
new ActionHandler<>(WatcherServiceAction.INSTANCE, TransportWatcherServiceAction.class),
|
new ActionHandler(WatcherServiceAction.INSTANCE, TransportWatcherServiceAction.class),
|
||||||
new ActionHandler<>(ExecuteWatchAction.INSTANCE, TransportExecuteWatchAction.class),
|
new ActionHandler(ExecuteWatchAction.INSTANCE, TransportExecuteWatchAction.class),
|
||||||
new ActionHandler<>(QueryWatchesAction.INSTANCE, TransportQueryWatchesAction.class),
|
new ActionHandler(QueryWatchesAction.INSTANCE, TransportQueryWatchesAction.class),
|
||||||
new ActionHandler<>(UpdateWatcherSettingsAction.INSTANCE, TransportUpdateWatcherSettingsAction.class),
|
new ActionHandler(UpdateWatcherSettingsAction.INSTANCE, TransportUpdateWatcherSettingsAction.class),
|
||||||
new ActionHandler<>(GetWatcherSettingsAction.INSTANCE, TransportGetWatcherSettingsAction.class),
|
new ActionHandler(GetWatcherSettingsAction.INSTANCE, TransportGetWatcherSettingsAction.class),
|
||||||
usageAction,
|
usageAction,
|
||||||
infoAction
|
infoAction
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue