diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/CreateAndFollowIndexAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/CreateAndFollowIndexAction.java index 7fc42dad276..813f1677eb9 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/CreateAndFollowIndexAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/CreateAndFollowIndexAction.java @@ -48,8 +48,7 @@ import java.io.IOException; import java.util.List; import java.util.Map; -public class CreateAndFollowIndexAction extends Action { +public class CreateAndFollowIndexAction extends Action { public static final CreateAndFollowIndexAction INSTANCE = new CreateAndFollowIndexAction(); public static final String NAME = "cluster:admin/xpack/ccr/create_and_follow_index"; @@ -58,11 +57,6 @@ public class CreateAndFollowIndexAction extends Action { + public static class RequestBuilder extends ActionRequestBuilder { RequestBuilder(ElasticsearchClient client) { super(client, INSTANCE, new Request()); @@ -254,7 +248,7 @@ public class CreateAndFollowIndexAction extends Action cursor : leaderIndexMetaData.getMappings()) { imdBuilder.putMapping(cursor.value); @@ -281,10 +275,10 @@ public class CreateAndFollowIndexAction extends Action { +public class FollowIndexAction extends Action { public static final FollowIndexAction INSTANCE = new FollowIndexAction(); public static final String NAME = "cluster:admin/xpack/ccr/follow_index"; @@ -50,11 +49,6 @@ public class FollowIndexAction extends Action { + public static class RequestBuilder extends ActionRequestBuilder { - RequestBuilder(ElasticsearchClient client, Action action) { + RequestBuilder(ElasticsearchClient client, Action action) { super(client, action, new Request()); } } diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardChangesAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardChangesAction.java index 4a25b446e25..ceea50a023c 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardChangesAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardChangesAction.java @@ -39,7 +39,7 @@ import java.util.Objects; import static org.elasticsearch.action.ValidateActions.addValidationError; -public class ShardChangesAction extends Action { +public class ShardChangesAction extends Action { public static final ShardChangesAction INSTANCE = new ShardChangesAction(); public static final String NAME = "indices:data/read/xpack/ccr/shard_changes"; @@ -48,11 +48,6 @@ public class ShardChangesAction extends Action { - RequestBuilder(ElasticsearchClient client, Action action) { + RequestBuilder(ElasticsearchClient client, Action action) { super(client, action, new Request()); } } diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java index d6f3bdf6bd1..73363479213 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/ShardFollowTasksExecutor.java @@ -427,8 +427,8 @@ public class ShardFollowTasksExecutor extends PersistentTasksExecutor> - void doExecute(Action action, Request request, ActionListener listener) { + RequestBuilder extends ActionRequestBuilder> + void doExecute(Action action, Request request, ActionListener listener) { final Supplier supplier = threadContext.newRestorableContext(false); try (ThreadContext.StoredContext ignore = stashWithHeaders(threadContext, filteredHeaders)) { super.doExecute(action, request, new ContextPreservingActionListener<>(supplier, listener)); diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/UnfollowIndexAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/UnfollowIndexAction.java index c528e40e547..d398cbf275e 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/UnfollowIndexAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/UnfollowIndexAction.java @@ -31,8 +31,7 @@ import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReferenceArray; -public class UnfollowIndexAction extends Action { +public class UnfollowIndexAction extends Action { public static final UnfollowIndexAction INSTANCE = new UnfollowIndexAction(); public static final String NAME = "cluster:admin/xpack/ccr/unfollow_index"; @@ -41,11 +40,6 @@ public class UnfollowIndexAction extends Action { + public static class RequestBuilder extends ActionRequestBuilder { RequestBuilder(ElasticsearchClient client) { super(client, INSTANCE, new Request()); diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsAction.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsAction.java index d14bb6345a4..0b2823b55d8 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsAction.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsAction.java @@ -9,7 +9,7 @@ import org.elasticsearch.action.Action; import org.elasticsearch.client.ElasticsearchClient; public class BulkShardOperationsAction - extends Action { + extends Action { public static final BulkShardOperationsAction INSTANCE = new BulkShardOperationsAction(); public static final String NAME = "indices:data/write/bulk_shard_operations[s]"; @@ -18,11 +18,6 @@ public class BulkShardOperationsAction super(NAME); } - @Override - public BulkShardOperationsRequestBuilder newRequestBuilder(ElasticsearchClient client) { - return new BulkShardOperationsRequestBuilder(client); - } - @Override public BulkShardOperationsResponse newResponse() { return new BulkShardOperationsResponse(); diff --git a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsRequestBuilder.java b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsRequestBuilder.java index 38b13dca9c0..23fa808dbee 100644 --- a/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsRequestBuilder.java +++ b/x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/action/bulk/BulkShardOperationsRequestBuilder.java @@ -9,7 +9,7 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; public class BulkShardOperationsRequestBuilder - extends ActionRequestBuilder { + extends ActionRequestBuilder { public BulkShardOperationsRequestBuilder(final ElasticsearchClient client) { super(client, BulkShardOperationsAction.INSTANCE, new BulkShardOperationsRequest());