diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java index 5aefc75599e..30084056056 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/DeleteLifecycleAction.java @@ -6,11 +6,9 @@ package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; -import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.AcknowledgedRequest; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; @@ -21,7 +19,7 @@ import java.io.IOException; import java.util.Objects; public class DeleteLifecycleAction - extends Action { + extends Action { public static final DeleteLifecycleAction INSTANCE = new DeleteLifecycleAction(); public static final String NAME = "cluster:admin/xpack/index_lifecycle/delete"; @@ -29,24 +27,11 @@ public class DeleteLifecycleAction super(NAME); } - @Override - public RequestBuilder newRequestBuilder(ElasticsearchClient client) { - return new RequestBuilder(client, this); - } - @Override public Response newResponse() { return new Response(); } - public static class RequestBuilder extends ActionRequestBuilder { - - protected RequestBuilder(ElasticsearchClient client, Action action) { - super(client, action, new Request()); - } - - } - public static class Response extends AcknowledgedResponse implements ToXContentObject { public Response() { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java index fb957f96ab0..44b193ac5c7 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/GetLifecycleAction.java @@ -6,11 +6,9 @@ package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; -import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.support.master.AcknowledgedRequest; -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -24,7 +22,7 @@ import java.util.List; import java.util.Objects; public class GetLifecycleAction - extends Action { + extends Action { public static final GetLifecycleAction INSTANCE = new GetLifecycleAction(); public static final String NAME = "cluster:admin/xpack/index_lifecycle/get"; @@ -32,24 +30,11 @@ public class GetLifecycleAction super(NAME); } - @Override - public RequestBuilder newRequestBuilder(ElasticsearchClient client) { - return new RequestBuilder(client, this); - } - @Override public Response newResponse() { return new Response(); } - public static class RequestBuilder extends ActionRequestBuilder { - - protected RequestBuilder(ElasticsearchClient client, Action action) { - super(client, action, new Request()); - } - - } - public static class Response extends ActionResponse implements ToXContentObject { private List policies; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java index 8e404a52858..a6654b04f8b 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/MoveToStepAction.java @@ -7,11 +7,9 @@ package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; -import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.AcknowledgedRequest; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; @@ -25,7 +23,7 @@ import org.elasticsearch.xpack.core.indexlifecycle.Step.StepKey; import java.io.IOException; import java.util.Objects; -public class MoveToStepAction extends Action { +public class MoveToStepAction extends Action { public static final MoveToStepAction INSTANCE = new MoveToStepAction(); public static final String NAME = "cluster:admin/xpack/index_lifecycle/_move/post"; @@ -33,24 +31,11 @@ public class MoveToStepAction extends Action { - - protected RequestBuilder(ElasticsearchClient client, Action action) { - super(client, action, new Request()); - } - - } - public static class Response extends AcknowledgedResponse implements ToXContentObject { public Response() { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java index a813c332c89..803b23a333f 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/PutLifecycleAction.java @@ -6,11 +6,9 @@ package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; -import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.master.AcknowledgedRequest; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; @@ -24,7 +22,7 @@ import org.elasticsearch.xpack.core.indexlifecycle.LifecyclePolicy; import java.io.IOException; import java.util.Objects; -public class PutLifecycleAction extends Action { +public class PutLifecycleAction extends Action { public static final PutLifecycleAction INSTANCE = new PutLifecycleAction(); public static final String NAME = "cluster:admin/xpack/index_lifecycle/put"; @@ -32,24 +30,11 @@ public class PutLifecycleAction extends Action { - - protected RequestBuilder(ElasticsearchClient client, Action action) { - super(client, action, new Request()); - } - - } - public static class Response extends AcknowledgedResponse implements ToXContentObject { public Response() { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java index ded1bc7f109..1c8525dc78c 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/action/RetryAction.java @@ -7,7 +7,6 @@ package org.elasticsearch.xpack.core.indexlifecycle.action; import org.elasticsearch.action.Action; -import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; @@ -15,7 +14,6 @@ import org.elasticsearch.action.support.IndicesOptions.Option; import org.elasticsearch.action.support.IndicesOptions.WildcardStates; import org.elasticsearch.action.support.master.AcknowledgedRequest; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -26,7 +24,7 @@ import java.util.Arrays; import java.util.EnumSet; import java.util.Objects; -public class RetryAction extends Action { +public class RetryAction extends Action { public static final RetryAction INSTANCE = new RetryAction(); public static final String NAME = "indices:admin/xpack/index_lifecycle/_retry/post"; @@ -34,24 +32,11 @@ public class RetryAction extends Action { - - protected RequestBuilder(ElasticsearchClient client, Action action) { - super(client, action, new Request()); - } - - } - public static class Response extends AcknowledgedResponse implements ToXContentObject { public Response() { diff --git a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java b/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java index 4f183e67afb..b34e7ef5955 100644 --- a/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java +++ b/x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/indexlifecycle/LifecyclePolicySecurityClient.java @@ -47,10 +47,8 @@ public class LifecyclePolicySecurityClient extends AbstractClient { } @Override - protected > void doExecute( - Action action, Request request, ActionListener listener) { + protected > void doExecute( + Action action, Request request, ActionListener listener) { ClientHelper.executeWithHeadersAsync(headers, origin, client, action, request, listener); } - }