Skip to content

Commit 1116889

Browse files
authored
Remove unused arg from ActionType ctor (#104650)
`ActionType` represents an action which runs on the local node, there's no need for implementations to define a `Reader<Response>`. This commit removes the unused constructor argument.
1 parent a7f2e2d commit 1116889

File tree

538 files changed

+554
-670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

538 files changed

+554
-670
lines changed

client/client-benchmark-noop-api-plugin/src/main/java/org/elasticsearch/plugin/noop/NoopPlugin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
public class NoopPlugin extends Plugin implements ActionPlugin {
3636

37-
public static final ActionType<SearchResponse> NOOP_SEARCH_ACTION = new ActionType<>("mock:data/read/search", SearchResponse::new);
38-
public static final ActionType<BulkResponse> NOOP_BULK_ACTION = new ActionType<>("mock:data/write/bulk", BulkResponse::new);
37+
public static final ActionType<SearchResponse> NOOP_SEARCH_ACTION = new ActionType<>("mock:data/read/search");
38+
public static final ActionType<BulkResponse> NOOP_BULK_ACTION = new ActionType<>("mock:data/write/bulk");
3939

4040
@Override
4141
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {

modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/action/DeleteDataStreamLifecycleAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
public class DeleteDataStreamLifecycleAction {
2727

28-
public static final ActionType<AcknowledgedResponse> INSTANCE = ActionType.localOnly("indices:admin/data_stream/lifecycle/delete");
28+
public static final ActionType<AcknowledgedResponse> INSTANCE = new ActionType<>("indices:admin/data_stream/lifecycle/delete");
2929

3030
private DeleteDataStreamLifecycleAction() {/* no instances */}
3131

modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/action/ExplainDataStreamLifecycleAction.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
public class ExplainDataStreamLifecycleAction {
3737

3838
public static final ActionType<ExplainDataStreamLifecycleAction.Response> INSTANCE = new ActionType<>(
39-
"indices:admin/data_stream/lifecycle/explain",
40-
Response::new
39+
"indices:admin/data_stream/lifecycle/explain"
4140
);
4241

4342
private ExplainDataStreamLifecycleAction() {/* no instances */}

modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/action/GetDataStreamLifecycleAction.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
public class GetDataStreamLifecycleAction {
3838

3939
public static final ActionType<GetDataStreamLifecycleAction.Response> INSTANCE = new ActionType<>(
40-
"indices:admin/data_stream/lifecycle/get",
41-
Response::new
40+
"indices:admin/data_stream/lifecycle/get"
4241
);
4342

4443
private GetDataStreamLifecycleAction() {/* no instances */}

modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/action/GetDataStreamLifecycleStatsAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class GetDataStreamLifecycleStatsAction extends ActionType<GetDataStreamL
3434
public static final String NAME = "cluster:monitor/data_stream/lifecycle/stats";
3535

3636
private GetDataStreamLifecycleStatsAction() {
37-
super(NAME, Response::new);
37+
super(NAME);
3838
}
3939

4040
public static class Request extends MasterNodeReadRequest<Request> {

modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/action/PutDataStreamLifecycleAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
public class PutDataStreamLifecycleAction {
4141

42-
public static final ActionType<AcknowledgedResponse> INSTANCE = ActionType.localOnly("indices:admin/data_stream/lifecycle/put");
42+
public static final ActionType<AcknowledgedResponse> INSTANCE = new ActionType<>("indices:admin/data_stream/lifecycle/put");
4343

4444
private PutDataStreamLifecycleAction() {/* no instances */}
4545

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/GrokProcessorGetAction.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@
4242

4343
public class GrokProcessorGetAction {
4444

45-
static final ActionType<GrokProcessorGetAction.Response> INSTANCE = new ActionType<>(
46-
"cluster:admin/ingest/processor/grok/get",
47-
Response::new
48-
);
45+
static final ActionType<GrokProcessorGetAction.Response> INSTANCE = new ActionType<>("cluster:admin/ingest/processor/grok/get");
4946

5047
private GrokProcessorGetAction() {/* no instances */}
5148

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/stats/GeoIpDownloaderStatsAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
public class GeoIpDownloaderStatsAction {
3434

35-
public static final ActionType<Response> INSTANCE = new ActionType<>("cluster:monitor/ingest/geoip/stats", Response::new);
35+
public static final ActionType<Response> INSTANCE = new ActionType<>("cluster:monitor/ingest/geoip/stats");
3636

3737
private GeoIpDownloaderStatsAction() {/* no instances */}
3838

modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MustachePlugin.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@
3434

3535
public class MustachePlugin extends Plugin implements ScriptPlugin, ActionPlugin, SearchPlugin {
3636

37-
public static final ActionType<SearchTemplateResponse> SEARCH_TEMPLATE_ACTION = new ActionType<>(
38-
"indices:data/read/search/template",
39-
SearchTemplateResponse::new
40-
);
37+
public static final ActionType<SearchTemplateResponse> SEARCH_TEMPLATE_ACTION = new ActionType<>("indices:data/read/search/template");
4138
public static final ActionType<MultiSearchTemplateResponse> MULTI_SEARCH_TEMPLATE_ACTION = new ActionType<>(
42-
"indices:data/read/msearch/template",
43-
MultiSearchTemplateResponse::new
39+
"indices:data/read/msearch/template"
4440
);
4541

4642
@Override

modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessContextAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
*/
5555
public class PainlessContextAction {
5656

57-
public static final ActionType<Response> INSTANCE = new ActionType<>("cluster:admin/scripts/painless/context", Response::new);
57+
public static final ActionType<Response> INSTANCE = new ActionType<>("cluster:admin/scripts/painless/context");
5858

5959
private static final String SCRIPT_CONTEXT_NAME_PARAM = "context";
6060

modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
public class PainlessExecuteAction {
118118

119-
public static final ActionType<Response> INSTANCE = ActionType.localOnly("cluster:admin/scripts/painless/execute");
119+
public static final ActionType<Response> INSTANCE = new ActionType<>("cluster:admin/scripts/painless/execute");
120120
public static final RemoteClusterActionType<Response> REMOTE_TYPE = new RemoteClusterActionType<>(INSTANCE.name(), Response::new);
121121

122122
private PainlessExecuteAction() {/* no instances */}

modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
public class RankEvalPlugin extends Plugin implements ActionPlugin {
3434

35-
public static final ActionType<RankEvalResponse> ACTION = new ActionType<>("indices:data/read/rank_eval", RankEvalResponse::new);
35+
public static final ActionType<RankEvalResponse> ACTION = new ActionType<>("indices:data/read/rank_eval");
3636

3737
@Override
3838
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {

modules/reindex/src/main/java/org/elasticsearch/reindex/ReindexPlugin.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@
4242
public class ReindexPlugin extends Plugin implements ActionPlugin {
4343
public static final String NAME = "reindex";
4444

45-
public static final ActionType<ListTasksResponse> RETHROTTLE_ACTION = new ActionType<>(
46-
"cluster:admin/reindex/rethrottle",
47-
ListTasksResponse::new
48-
);
45+
public static final ActionType<ListTasksResponse> RETHROTTLE_ACTION = new ActionType<>("cluster:admin/reindex/rethrottle");
4946

5047
@Override
5148
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {

modules/rest-root/src/main/java/org/elasticsearch/rest/root/MainRestPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
public class MainRestPlugin extends Plugin implements ActionPlugin {
3030

31-
public static final ActionType<MainResponse> MAIN_ACTION = ActionType.localOnly("cluster:monitor/main");
31+
public static final ActionType<MainResponse> MAIN_ACTION = new ActionType<>("cluster:monitor/main");
3232

3333
@Override
3434
public List<RestHandler> getRestHandlers(

server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public void writeTo(StreamOutput out) throws IOException {
504504

505505
public static class TransportTestAction extends HandledTransportAction<TestRequest, TestResponse> {
506506

507-
public static ActionType<TestResponse> ACTION = new ActionType<>("internal::test_action", TestResponse::new);
507+
public static ActionType<TestResponse> ACTION = new ActionType<>("internal::test_action");
508508
private final TransportService transportService;
509509
private final NodeClient client;
510510

server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/ListTasksIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected Collection<Class<? extends Plugin>> getPlugins() {
142142
return List.of(TestPlugin.class);
143143
}
144144

145-
private static final ActionType<ActionResponse.Empty> TEST_ACTION = ActionType.emptyResponse(TestTransportAction.NAME);
145+
private static final ActionType<ActionResponse.Empty> TEST_ACTION = new ActionType<>(TestTransportAction.NAME);
146146

147147
public static class TestPlugin extends Plugin implements ActionPlugin {
148148
volatile CyclicBarrier barrier;

server/src/internalClusterTest/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public Response(StreamInput in) throws IOException {
8282

8383
public static class TestAction extends TransportReplicationAction<Request, Request, Response> {
8484
private static final String ACTION_NAME = "internal:test-replication-action";
85-
private static final ActionType<Response> TYPE = new ActionType<>(ACTION_NAME, Response::new);
85+
private static final ActionType<Response> TYPE = new ActionType<>(ACTION_NAME);
8686

8787
@Inject
8888
public TestAction(

server/src/main/java/org/elasticsearch/action/ActionType.java

+3-23
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
1212
import org.elasticsearch.action.support.nodes.TransportNodesAction;
1313
import org.elasticsearch.client.internal.Client;
14-
import org.elasticsearch.client.internal.node.NodeClient;
15-
import org.elasticsearch.common.io.stream.Writeable;
1614
import org.elasticsearch.plugins.ActionPlugin;
1715
import org.elasticsearch.transport.TransportService;
1816

@@ -25,39 +23,21 @@
2523
* TYPE}. Some legacy implementations create custom subclasses of {@link ActionType} but this is unnecessary and somewhat wasteful. Prefer
2624
* to create instances of this class directly whenever possible.
2725
*/
26+
@SuppressWarnings("unused") // Response type arg is used to enable better type inference when calling Client#execute
2827
public class ActionType<Response extends ActionResponse> {
2928

3029
private final String name;
3130

3231
/**
33-
* Construct an {@link ActionType} which callers can execute on the local node (using {@link NodeClient}).
32+
* Construct an {@link ActionType} with the given name.
3433
* <p>
3534
* There is no facility for directly executing an action on a different node in the local cluster. To achieve this, implement an action
3635
* which runs on the local node and knows how to use the {@link TransportService} to forward the request to a different node. There are
3736
* several utilities that help implement such an action, including {@link TransportNodesAction} or {@link TransportMasterNodeAction}.
3837
*
3938
* @param name The name of the action, which must be unique across actions.
40-
* @return an {@link ActionType} which callers can execute on the local node.
4139
*/
42-
public static <T extends ActionResponse> ActionType<T> localOnly(String name) {
43-
return new ActionType<>(name, Writeable.Reader.localOnly());
44-
}
45-
46-
public static ActionType<ActionResponse.Empty> emptyResponse(String name) {
47-
return new ActionType<>(name, in -> ActionResponse.Empty.INSTANCE);
48-
}
49-
50-
/**
51-
* Construct an {@link ActionType} and specify a method that can deserialize the response. This {@code responseReader} parameter is
52-
* effectively unused. Use {@link #localOnly} instead.
53-
* <p>
54-
* There is no facility for directly executing an action on a different node in the local cluster. To achieve this, implement an action
55-
* which runs on the local node and knows how to use the {@link TransportService} to forward the request to a different node. There are
56-
* several utilities that help implement such an action, including {@link TransportNodesAction} or {@link TransportMasterNodeAction}.
57-
*
58-
* @param name The name of the action, which must be unique across actions.
59-
*/
60-
public ActionType(String name, Writeable.Reader<Response> ignored) {
40+
public ActionType(String name) {
6141
this.name = name;
6242
}
6343

server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ public class TransportClusterAllocationExplainAction extends TransportMasterNode
4444
ClusterAllocationExplainRequest,
4545
ClusterAllocationExplainResponse> {
4646

47-
public static final ActionType<ClusterAllocationExplainResponse> TYPE = new ActionType<>(
48-
"cluster:monitor/allocation/explain",
49-
ClusterAllocationExplainResponse::new
50-
);
47+
public static final ActionType<ClusterAllocationExplainResponse> TYPE = new ActionType<>("cluster:monitor/allocation/explain");
5148
private static final Logger logger = LogManager.getLogger(TransportClusterAllocationExplainAction.class);
5249

5350
private final ClusterInfoService clusterInfoService;

server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportDeleteDesiredBalanceAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
public class TransportDeleteDesiredBalanceAction extends TransportMasterNodeAction<DesiredBalanceRequest, ActionResponse.Empty> {
3737

38-
public static final ActionType<ActionResponse.Empty> TYPE = ActionType.emptyResponse("cluster:admin/desired_balance/reset");
38+
public static final ActionType<ActionResponse.Empty> TYPE = new ActionType<>("cluster:admin/desired_balance/reset");
3939
@Nullable
4040
private final MasterServiceTaskQueue<ResetDesiredBalanceTask> resetDesiredBalanceTaskQueue;
4141

server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportGetDesiredBalanceAction.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@
4343

4444
public class TransportGetDesiredBalanceAction extends TransportMasterNodeReadAction<DesiredBalanceRequest, DesiredBalanceResponse> {
4545

46-
public static final ActionType<DesiredBalanceResponse> TYPE = new ActionType<>(
47-
"cluster:admin/desired_balance/get",
48-
DesiredBalanceResponse::from
49-
);
46+
public static final ActionType<DesiredBalanceResponse> TYPE = new ActionType<>("cluster:admin/desired_balance/get");
5047
@Nullable
5148
private final DesiredBalanceShardsAllocator desiredBalanceShardsAllocator;
5249
private final ClusterInfoService clusterInfoService;

server/src/main/java/org/elasticsearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class TransportAddVotingConfigExclusionsAction extends TransportMasterNod
4949
AddVotingConfigExclusionsRequest,
5050
ActionResponse.Empty> {
5151

52-
public static final ActionType<ActionResponse.Empty> TYPE = ActionType.emptyResponse("cluster:admin/voting_config/add_exclusions");
52+
public static final ActionType<ActionResponse.Empty> TYPE = new ActionType<>("cluster:admin/voting_config/add_exclusions");
5353
private static final Logger logger = LogManager.getLogger(TransportAddVotingConfigExclusionsAction.class);
5454

5555
public static final Setting<Integer> MAXIMUM_VOTING_CONFIG_EXCLUSIONS_SETTING = Setting.intSetting(

server/src/main/java/org/elasticsearch/action/admin/cluster/configuration/TransportClearVotingConfigExclusionsAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class TransportClearVotingConfigExclusionsAction extends TransportMasterN
4343
ClearVotingConfigExclusionsRequest,
4444
ActionResponse.Empty> {
4545

46-
public static final ActionType<ActionResponse.Empty> TYPE = ActionType.emptyResponse("cluster:admin/voting_config/clear_exclusions");
46+
public static final ActionType<ActionResponse.Empty> TYPE = new ActionType<>("cluster:admin/voting_config/clear_exclusions");
4747
private static final Logger logger = LogManager.getLogger(TransportClearVotingConfigExclusionsAction.class);
4848
private final Reconfigurator reconfigurator;
4949

server/src/main/java/org/elasticsearch/action/admin/cluster/coordination/ClusterFormationInfoAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class ClusterFormationInfoAction extends ActionType<ClusterFormationInfoA
3737
public static final String NAME = "internal:cluster/formation/info";
3838

3939
private ClusterFormationInfoAction() {
40-
super(NAME, ClusterFormationInfoAction.Response::new);
40+
super(NAME);
4141
}
4242

4343
public static class Request extends ActionRequest {

server/src/main/java/org/elasticsearch/action/admin/cluster/coordination/CoordinationDiagnosticsAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class CoordinationDiagnosticsAction extends ActionType<CoordinationDiagno
3838
public static final String NAME = "internal:cluster/coordination_diagnostics/info";
3939

4040
private CoordinationDiagnosticsAction() {
41-
super(NAME, CoordinationDiagnosticsAction.Response::new);
41+
super(NAME);
4242
}
4343

4444
public static class Request extends ActionRequest {

server/src/main/java/org/elasticsearch/action/admin/cluster/coordination/MasterHistoryAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class MasterHistoryAction extends ActionType<MasterHistoryAction.Response
3838
public static final String NAME = "internal:cluster/master_history/get";
3939

4040
private MasterHistoryAction() {
41-
super(NAME, MasterHistoryAction.Response::new);
41+
super(NAME);
4242
}
4343

4444
public static class Request extends ActionRequest {

server/src/main/java/org/elasticsearch/action/admin/cluster/desirednodes/GetDesiredNodesAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class GetDesiredNodesAction extends ActionType<GetDesiredNodesAction.Resp
2929
public static final String NAME = "cluster:admin/desired_nodes/get";
3030

3131
GetDesiredNodesAction() {
32-
super(NAME, Response::new);
32+
super(NAME);
3333
}
3434

3535
public static class Request extends MasterNodeReadRequest<Request> {

server/src/main/java/org/elasticsearch/action/admin/cluster/desirednodes/TransportDeleteDesiredNodesAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
public class TransportDeleteDesiredNodesAction extends TransportMasterNodeAction<AcknowledgedRequest.Plain, ActionResponse.Empty> {
3939

40-
public static final ActionType<ActionResponse.Empty> TYPE = ActionType.emptyResponse("cluster:admin/desired_nodes/delete");
40+
public static final ActionType<ActionResponse.Empty> TYPE = new ActionType<>("cluster:admin/desired_nodes/delete");
4141
private final MasterServiceTaskQueue<DeleteDesiredNodesTask> taskQueue;
4242

4343
@Inject

server/src/main/java/org/elasticsearch/action/admin/cluster/desirednodes/UpdateDesiredNodesAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class UpdateDesiredNodesAction extends ActionType<UpdateDesiredNodesRespo
1515
public static final String NAME = "cluster:admin/desired_nodes/update";
1616

1717
UpdateDesiredNodesAction() {
18-
super(NAME, UpdateDesiredNodesResponse::new);
18+
super(NAME);
1919
}
2020
}

server/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
public class TransportClusterHealthAction extends TransportMasterNodeReadAction<ClusterHealthRequest, ClusterHealthResponse> {
5050

5151
public static final String NAME = "cluster:monitor/health";
52-
public static final ActionType<ClusterHealthResponse> TYPE = new ActionType<ClusterHealthResponse>(NAME, ClusterHealthResponse::new);
52+
public static final ActionType<ClusterHealthResponse> TYPE = new ActionType<ClusterHealthResponse>(NAME);
5353
private static final Logger logger = LogManager.getLogger(TransportClusterHealthAction.class);
5454

5555
private final AllocationService allocationService;

server/src/main/java/org/elasticsearch/action/admin/cluster/migration/GetFeatureUpgradeStatusAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public class GetFeatureUpgradeStatusAction extends ActionType<GetFeatureUpgradeS
1919
public static final String NAME = "cluster:admin/migration/get_system_feature";
2020

2121
private GetFeatureUpgradeStatusAction() {
22-
super(NAME, GetFeatureUpgradeStatusResponse::new);
22+
super(NAME);
2323
}
2424
}

server/src/main/java/org/elasticsearch/action/admin/cluster/migration/PostFeatureUpgradeAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public class PostFeatureUpgradeAction extends ActionType<PostFeatureUpgradeRespo
1919
public static final String NAME = "cluster:admin/migration/post_system_feature";
2020

2121
private PostFeatureUpgradeAction() {
22-
super(NAME, PostFeatureUpgradeResponse::new);
22+
super(NAME);
2323
}
2424
}

server/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class TransportNodesHotThreadsAction extends TransportNodesAction<
3939
TransportNodesHotThreadsAction.NodeRequest,
4040
NodeHotThreads> {
4141

42-
public static final ActionType<NodesHotThreadsResponse> TYPE = ActionType.localOnly("cluster:monitor/nodes/hot_threads");
42+
public static final ActionType<NodesHotThreadsResponse> TYPE = new ActionType<>("cluster:monitor/nodes/hot_threads");
4343

4444
@Inject
4545
public TransportNodesHotThreadsAction(

server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class TransportNodesInfoAction extends TransportNodesAction<
3535
TransportNodesInfoAction.NodeInfoRequest,
3636
NodeInfo> {
3737

38-
public static final ActionType<NodesInfoResponse> TYPE = ActionType.localOnly("cluster:monitor/nodes/info");
38+
public static final ActionType<NodesInfoResponse> TYPE = new ActionType<>("cluster:monitor/nodes/info");
3939
private final NodeService nodeService;
4040

4141
@Inject

server/src/main/java/org/elasticsearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ public class TransportNodesReloadSecureSettingsAction extends TransportNodesActi
4040
NodesReloadSecureSettingsRequest.NodeRequest,
4141
NodesReloadSecureSettingsResponse.NodeResponse> {
4242

43-
public static final ActionType<NodesReloadSecureSettingsResponse> TYPE = ActionType.localOnly(
44-
"cluster:admin/nodes/reload_secure_settings"
45-
);
43+
public static final ActionType<NodesReloadSecureSettingsResponse> TYPE = new ActionType<>("cluster:admin/nodes/reload_secure_settings");
4644

4745
private static final Logger logger = LogManager.getLogger(TransportNodesReloadSecureSettingsAction.class);
4846

server/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/PrevalidateNodeRemovalAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class PrevalidateNodeRemovalAction extends ActionType<PrevalidateNodeRemo
1616
public static final String NAME = "cluster:admin/shutdown/prevalidate_removal";
1717

1818
private PrevalidateNodeRemovalAction() {
19-
super(NAME, PrevalidateNodeRemovalResponse::new);
19+
super(NAME);
2020
}
2121

2222
}

0 commit comments

Comments
 (0)