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:
Ryan Ernst 2025-04-07 16:22:56 -07:00 committed by GitHub
parent 9feac7833e
commit 991e80d56e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 629 additions and 782 deletions

View file

@ -7,8 +7,6 @@
package org.elasticsearch.xpack.downsample;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.action.downsample.DownsampleAction;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
@ -63,10 +61,10 @@ public class Downsample extends Plugin implements ActionPlugin, PersistentTaskPl
}
@Override
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
public List<ActionHandler> getActions() {
return List.of(
new ActionHandler<>(DownsampleAction.INSTANCE, TransportDownsampleAction.class),
new ActionHandler<>(
new ActionHandler(DownsampleAction.INSTANCE, TransportDownsampleAction.class),
new ActionHandler(
DownsampleShardPersistentTaskExecutor.DelegatingAction.INSTANCE,
DownsampleShardPersistentTaskExecutor.DelegatingAction.TA.class
)