diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java index f373689566f..aff58a7b327 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.health; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Priority; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; @@ -37,7 +37,7 @@ import static org.elasticsearch.common.unit.TimeValue.readTimeValue; /** * */ -public class ClusterHealthRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public class ClusterHealthRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices; private TimeValue timeout = new TimeValue(30, TimeUnit.SECONDS); diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java index d183ddd865c..c4cb95c501b 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.health; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.common.Strings; @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportService; /** * */ -public class TransportClusterHealthAction extends TransportMasterNodeReadOperationAction { +public class TransportClusterHealthAction extends TransportMasterNodeReadAction { private final ClusterName clusterName; private final GatewayAllocator gatewayAllocator; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java index 9485395057e..635be28a646 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodeHotThreads.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.hotthreads; -import org.elasticsearch.action.support.nodes.NodeOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodeResponse; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -28,7 +28,7 @@ import java.io.IOException; /** */ -public class NodeHotThreads extends NodeOperationResponse { +public class NodeHotThreads extends BaseNodeResponse { private String hotThreads; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java index fe092d7dc81..f7ab360c59f 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.node.hotthreads; import org.elasticsearch.Version; -import org.elasticsearch.action.support.nodes.NodesOperationRequest; +import org.elasticsearch.action.support.nodes.BaseNodesRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.unit.TimeValue; @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit; /** */ -public class NodesHotThreadsRequest extends NodesOperationRequest { +public class NodesHotThreadsRequest extends BaseNodesRequest { int threads = 3; String type = "cpu"; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java index 2b04435eeb4..22d4795fc95 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.hotthreads; -import org.elasticsearch.action.support.nodes.NodesOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodesResponse; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -28,7 +28,7 @@ import java.io.IOException; /** */ -public class NodesHotThreadsResponse extends NodesOperationResponse { +public class NodesHotThreadsResponse extends BaseNodesResponse { NodesHotThreadsResponse() { } diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java index 8b509ef2d94..a73982e5c0c 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java @@ -22,8 +22,8 @@ package org.elasticsearch.action.admin.cluster.node.hotthreads; import com.google.common.collect.Lists; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.nodes.NodeOperationRequest; -import org.elasticsearch.action.support.nodes.TransportNodesOperationAction; +import org.elasticsearch.action.support.nodes.BaseNodeRequest; +import org.elasticsearch.action.support.nodes.TransportNodesAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.common.inject.Inject; @@ -41,7 +41,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public class TransportNodesHotThreadsAction extends TransportNodesOperationAction { +public class TransportNodesHotThreadsAction extends TransportNodesAction { @Inject public TransportNodesHotThreadsAction(Settings settings, ClusterName clusterName, ThreadPool threadPool, @@ -92,7 +92,7 @@ public class TransportNodesHotThreadsAction extends TransportNodesOperationActio return false; } - static class NodeRequest extends NodeOperationRequest { + static class NodeRequest extends BaseNodeRequest { NodesHotThreadsRequest request; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java index 66904933db4..f3c5eb7e1fc 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.node.info; import com.google.common.collect.ImmutableMap; import org.elasticsearch.Build; import org.elasticsearch.Version; -import org.elasticsearch.action.support.nodes.NodeOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodeResponse; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; @@ -42,7 +42,7 @@ import java.util.Map; /** * Node information (static, does not change over time). */ -public class NodeInfo extends NodeOperationResponse { +public class NodeInfo extends BaseNodeResponse { @Nullable private ImmutableMap serviceAttributes; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java index 589471af36d..d01167ceeca 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.info; -import org.elasticsearch.action.support.nodes.NodesOperationRequest; +import org.elasticsearch.action.support.nodes.BaseNodesRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -28,7 +28,7 @@ import java.io.IOException; /** * A request to get node (cluster) level information. */ -public class NodesInfoRequest extends NodesOperationRequest { +public class NodesInfoRequest extends BaseNodesRequest { private boolean settings = true; private boolean os = true; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoResponse.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoResponse.java index b7ce109484d..e872be90142 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.info; -import org.elasticsearch.action.support.nodes.NodesOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodesResponse; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -34,7 +34,7 @@ import java.util.Map; /** * */ -public class NodesInfoResponse extends NodesOperationResponse implements ToXContent { +public class NodesInfoResponse extends BaseNodesResponse implements ToXContent { public NodesInfoResponse() { } diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java index 29a904fa551..74221fc79ed 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/info/TransportNodesInfoAction.java @@ -20,8 +20,8 @@ package org.elasticsearch.action.admin.cluster.node.info; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.nodes.NodeOperationRequest; -import org.elasticsearch.action.support.nodes.TransportNodesOperationAction; +import org.elasticsearch.action.support.nodes.BaseNodeRequest; +import org.elasticsearch.action.support.nodes.TransportNodesAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.common.inject.Inject; @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public class TransportNodesInfoAction extends TransportNodesOperationAction { +public class TransportNodesInfoAction extends TransportNodesAction { private final NodeService nodeService; @@ -87,7 +87,7 @@ public class TransportNodesInfoAction extends TransportNodesOperationAction { +public class NodesStatsRequest extends BaseNodesRequest { private CommonStatsFlags indices = new CommonStatsFlags(); private boolean os; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java index 27affe2b898..e57fd552d7c 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.stats; -import org.elasticsearch.action.support.nodes.NodesOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodesResponse; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import java.io.IOException; /** * */ -public class NodesStatsResponse extends NodesOperationResponse implements ToXContent { +public class NodesStatsResponse extends BaseNodesResponse implements ToXContent { NodesStatsResponse() { } diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java index 1f8dea37aae..d808f859037 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java @@ -21,8 +21,8 @@ package org.elasticsearch.action.admin.cluster.node.stats; import com.google.common.collect.Lists; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.nodes.NodeOperationRequest; -import org.elasticsearch.action.support.nodes.TransportNodesOperationAction; +import org.elasticsearch.action.support.nodes.BaseNodeRequest; +import org.elasticsearch.action.support.nodes.TransportNodesAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.common.inject.Inject; @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public class TransportNodesStatsAction extends TransportNodesOperationAction { +public class TransportNodesStatsAction extends TransportNodesAction { private final NodeService nodeService; @@ -87,7 +87,7 @@ public class TransportNodesStatsAction extends TransportNodesOperationAction { +public class TransportDeleteRepositoryAction extends TransportMasterNodeAction { private final RepositoriesService repositoriesService; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java index 86c999982d1..4f5f99b2072 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java @@ -19,9 +19,8 @@ package org.elasticsearch.action.admin.cluster.repositories.get; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -33,7 +32,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * Get repository request */ -public class GetRepositoriesRequest extends MasterNodeReadOperationRequest { +public class GetRepositoriesRequest extends MasterNodeReadRequest { private String[] repositories = Strings.EMPTY_ARRAY; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java index 45026f08786..5c58628dc35 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/TransportGetRepositoriesAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.repositories.get; import com.google.common.collect.ImmutableList; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -39,7 +39,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport action for get repositories operation */ -public class TransportGetRepositoriesAction extends TransportMasterNodeReadOperationAction { +public class TransportGetRepositoriesAction extends TransportMasterNodeReadAction { @Inject public TransportGetRepositoriesAction(Settings settings, TransportService transportService, ClusterService clusterService, diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java index bde461ccf8a..a395d9b9ef2 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/TransportPutRepositoryAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.repositories.put; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -36,7 +36,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport action for register repository operation */ -public class TransportPutRepositoryAction extends TransportMasterNodeOperationAction { +public class TransportPutRepositoryAction extends TransportMasterNodeAction { private final RepositoriesService repositoriesService; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java index 978738d9f8c..ed687ae2bfd 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/TransportVerifyRepositoryAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.repositories.verify; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport action for verifying repository operation */ -public class TransportVerifyRepositoryAction extends TransportMasterNodeOperationAction { +public class TransportVerifyRepositoryAction extends TransportMasterNodeAction { private final RepositoriesService repositoriesService; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java index 1d4f0a6185e..d9829d1e078 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.reroute; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.AckedClusterStateUpdateTask; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -38,7 +38,7 @@ import org.elasticsearch.transport.TransportService; /** */ -public class TransportClusterRerouteAction extends TransportMasterNodeOperationAction { +public class TransportClusterRerouteAction extends TransportMasterNodeAction { private final AllocationService allocationService; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java index db872f868fd..31375a8912d 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.settings; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.AckedClusterStateUpdateTask; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -49,7 +49,7 @@ import static org.elasticsearch.cluster.ClusterState.builder; /** * */ -public class TransportClusterUpdateSettingsAction extends TransportMasterNodeOperationAction { +public class TransportClusterUpdateSettingsAction extends TransportMasterNodeAction { private final AllocationService allocationService; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java index de8e1fcdfab..21ecf8a4c4f 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.shards; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; @@ -32,7 +32,7 @@ import java.io.IOException; /** */ -public class ClusterSearchShardsRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public class ClusterSearchShardsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices; @Nullable private String routing; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java index 1575f3c61a8..10ef0348e46 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/shards/TransportClusterSearchShardsAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.shards; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -42,7 +42,7 @@ import static com.google.common.collect.Sets.newHashSet; /** */ -public class TransportClusterSearchShardsAction extends TransportMasterNodeReadOperationAction { +public class TransportClusterSearchShardsAction extends TransportMasterNodeReadAction { @Inject public TransportClusterSearchShardsAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters) { diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java index 9e8c87bbbae..1373eed1507 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; @@ -60,7 +60,7 @@ import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeBo *
  • must not contain invalid file name characters {@link org.elasticsearch.common.Strings#INVALID_FILENAME_CHARS}
  • * */ -public class CreateSnapshotRequest extends MasterNodeOperationRequest implements IndicesRequest.Replaceable { +public class CreateSnapshotRequest extends MasterNodeRequest implements IndicesRequest.Replaceable { private String snapshot; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java index 533d0778925..e97633932d1 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.create; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport action for create snapshot operation */ -public class TransportCreateSnapshotAction extends TransportMasterNodeOperationAction { +public class TransportCreateSnapshotAction extends TransportMasterNodeAction { private final SnapshotsService snapshotsService; @Inject diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java index 5d6c5544184..d997786d5fc 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.delete; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -35,7 +35,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; * files that are associated with this particular snapshot. All files that are shared with * at least one other existing snapshot are left intact. */ -public class DeleteSnapshotRequest extends MasterNodeOperationRequest { +public class DeleteSnapshotRequest extends MasterNodeRequest { private String repository; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java index 5b5a31bedde..97f89c9f647 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/TransportDeleteSnapshotAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.delete; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -36,7 +36,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport action for delete snapshot operation */ -public class TransportDeleteSnapshotAction extends TransportMasterNodeOperationAction { +public class TransportDeleteSnapshotAction extends TransportMasterNodeAction { private final SnapshotsService snapshotsService; @Inject diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java index 6b6927b5e0d..03edadd755b 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.get; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * Get snapshot request */ -public class GetSnapshotsRequest extends MasterNodeOperationRequest { +public class GetSnapshotsRequest extends MasterNodeRequest { public static final String ALL_SNAPSHOTS = "_all"; public static final String CURRENT_SNAPSHOT = "_current"; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java index 9ead8554943..6f480219857 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/TransportGetSnapshotsAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.get; import com.google.common.collect.ImmutableList; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -39,7 +39,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport Action for get snapshots operation */ -public class TransportGetSnapshotsAction extends TransportMasterNodeOperationAction { +public class TransportGetSnapshotsAction extends TransportMasterNodeAction { private final SnapshotsService snapshotsService; @Inject diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java index 63f595747a1..ddb177e273b 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; @@ -48,7 +48,7 @@ import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeBo /** * Restore snapshot request */ -public class RestoreSnapshotRequest extends MasterNodeOperationRequest { +public class RestoreSnapshotRequest extends MasterNodeRequest { private String snapshot; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java index 70ab71b6e8f..205a2d1178b 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.restore; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportService; /** * Transport action for restore snapshot operation */ -public class TransportRestoreSnapshotAction extends TransportMasterNodeOperationAction { +public class TransportRestoreSnapshotAction extends TransportMasterNodeAction { private final RestoreService restoreService; @Inject diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java index 878ca704345..1f358915662 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.status; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContent; @@ -32,7 +32,7 @@ import java.io.IOException; /** */ -public class SnapshotIndexShardStatus extends BroadcastShardOperationResponse implements ToXContent { +public class SnapshotIndexShardStatus extends BroadcastShardResponse implements ToXContent { private SnapshotIndexShardStage stage = SnapshotIndexShardStage.INIT; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java index c84ad073bd8..b7b2b631b31 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.status; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * Get snapshot status request */ -public class SnapshotsStatusRequest extends MasterNodeOperationRequest { +public class SnapshotsStatusRequest extends MasterNodeRequest { private String repository = "_all"; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java index b23010e3ecc..22a1753660e 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java @@ -47,7 +47,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * Transport client that collects snapshot shard statuses from data nodes */ -public class TransportNodesSnapshotsStatus extends TransportNodesOperationAction { +public class TransportNodesSnapshotsStatus extends TransportNodesAction { public static final String ACTION_NAME = SnapshotsStatusAction.NAME + "[nodes]"; @@ -128,7 +128,7 @@ public class TransportNodesSnapshotsStatus extends TransportNodesOperationAction return true; } - static class Request extends NodesOperationRequest { + static class Request extends BaseNodesRequest { private SnapshotId[] snapshotIds; @@ -157,7 +157,7 @@ public class TransportNodesSnapshotsStatus extends TransportNodesOperationAction } } - public static class NodesSnapshotStatus extends NodesOperationResponse { + public static class NodesSnapshotStatus extends BaseNodesResponse { private FailedNodeException[] failures; @@ -194,7 +194,7 @@ public class TransportNodesSnapshotsStatus extends TransportNodesOperationAction } - static class NodeRequest extends NodeOperationRequest { + static class NodeRequest extends BaseNodeRequest { private SnapshotId[] snapshotIds; @@ -230,7 +230,7 @@ public class TransportNodesSnapshotsStatus extends TransportNodesOperationAction } } - public static class NodeSnapshotStatus extends NodeOperationResponse { + public static class NodeSnapshotStatus extends BaseNodeResponse { private ImmutableMap> status; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java index edfc9d5fd32..a38e894e90f 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/TransportSnapshotsStatusAction.java @@ -23,7 +23,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -49,7 +49,7 @@ import static com.google.common.collect.Sets.newHashSet; /** */ -public class TransportSnapshotsStatusAction extends TransportMasterNodeOperationAction { +public class TransportSnapshotsStatusAction extends TransportMasterNodeAction { private final SnapshotsService snapshotsService; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequest.java index 574ed0170f3..4edd26812a0 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequest.java @@ -19,11 +19,10 @@ package org.elasticsearch.action.admin.cluster.state; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -33,7 +32,7 @@ import java.io.IOException; /** * */ -public class ClusterStateRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public class ClusterStateRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private boolean routingTable = true; private boolean nodes = true; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java index d4d647b99b0..e989b7a5df8 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.state; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -39,7 +39,7 @@ import org.elasticsearch.transport.TransportService; /** * */ -public class TransportClusterStateAction extends TransportMasterNodeReadOperationAction { +public class TransportClusterStateAction extends TransportMasterNodeReadAction { private final ClusterName clusterName; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java b/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java index 24222da8b5a..d0f91f7e9b9 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodeResponse.java @@ -23,7 +23,7 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.stats.NodeStats; import org.elasticsearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.support.nodes.NodeOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodeResponse; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; @@ -31,7 +31,7 @@ import org.elasticsearch.common.io.stream.StreamOutput; import java.io.IOException; -public class ClusterStatsNodeResponse extends NodeOperationResponse { +public class ClusterStatsNodeResponse extends BaseNodeResponse { private NodeInfo nodeInfo; private NodeStats nodeStats; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequest.java b/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequest.java index 3a0c26af10c..d33f9acf296 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.stats; -import org.elasticsearch.action.support.nodes.NodesOperationRequest; +import org.elasticsearch.action.support.nodes.BaseNodesRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -28,7 +28,7 @@ import java.io.IOException; /** * A request to get cluster level stats. */ -public class ClusterStatsRequest extends NodesOperationRequest { +public class ClusterStatsRequest extends BaseNodesRequest { ClusterStatsRequest() { } diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsResponse.java b/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsResponse.java index 3b84e86ea8e..aebdf6c31c3 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.stats; import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; -import org.elasticsearch.action.support.nodes.NodesOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodesResponse; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -37,7 +37,7 @@ import java.util.Map; /** * */ -public class ClusterStatsResponse extends NodesOperationResponse implements ToXContent { +public class ClusterStatsResponse extends BaseNodesResponse implements ToXContent { ClusterStatsNodes nodesStats; ClusterStatsIndices indicesStats; diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java index c2254ed1294..40c1c8b9e74 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java @@ -26,8 +26,8 @@ import org.elasticsearch.action.admin.cluster.node.stats.NodeStats; import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags; import org.elasticsearch.action.admin.indices.stats.ShardStats; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.nodes.NodeOperationRequest; -import org.elasticsearch.action.support.nodes.TransportNodesOperationAction; +import org.elasticsearch.action.support.nodes.BaseNodeRequest; +import org.elasticsearch.action.support.nodes.TransportNodesAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.metadata.IndexMetaData; @@ -51,7 +51,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public class TransportClusterStatsAction extends TransportNodesOperationAction { private static final CommonStatsFlags SHARD_STATS_FLAGS = new CommonStatsFlags(CommonStatsFlags.Flag.Docs, CommonStatsFlags.Flag.Store, @@ -142,7 +142,7 @@ public class TransportClusterStatsAction extends TransportNodesOperationAction { +public class PendingClusterTasksRequest extends MasterNodeReadRequest { @Override public ActionRequestValidationException validate() { diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java index 40f634cef2c..5b7f2a881c3 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/tasks/TransportPendingClusterTasksAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.tasks; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -33,7 +33,7 @@ import org.elasticsearch.transport.TransportService; /** */ -public class TransportPendingClusterTasksAction extends TransportMasterNodeReadOperationAction { +public class TransportPendingClusterTasksAction extends TransportMasterNodeReadAction { private final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/TransportIndicesAliasesAction.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/TransportIndicesAliasesAction.java index 2ba0c606614..4bedc3e3ee8 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/TransportIndicesAliasesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/TransportIndicesAliasesAction.java @@ -23,7 +23,7 @@ import com.google.common.collect.Sets; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -42,7 +42,7 @@ import java.util.*; /** * Add/remove aliases action */ -public class TransportIndicesAliasesAction extends TransportMasterNodeOperationAction { +public class TransportIndicesAliasesAction extends TransportMasterNodeAction { private final MetaDataIndexAliasesService indexAliasesService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java index a85202a308c..29754edeb6f 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/TransportAliasesExistAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.alias.exists; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -33,7 +33,7 @@ import org.elasticsearch.transport.TransportService; /** */ -public class TransportAliasesExistAction extends TransportMasterNodeReadOperationAction { +public class TransportAliasesExistAction extends TransportMasterNodeReadAction { @Inject public TransportAliasesExistAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters) { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequest.java index e22e110c942..182b86fd149 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequest.java @@ -18,11 +18,10 @@ */ package org.elasticsearch.action.admin.indices.alias.get; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.AliasesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -31,7 +30,7 @@ import java.io.IOException; /** */ -public class GetAliasesRequest extends MasterNodeReadOperationRequest implements AliasesRequest { +public class GetAliasesRequest extends MasterNodeReadRequest implements AliasesRequest { private String[] indices = Strings.EMPTY_ARRAY; private String[] aliases = Strings.EMPTY_ARRAY; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/alias/get/TransportGetAliasesAction.java b/src/main/java/org/elasticsearch/action/admin/indices/alias/get/TransportGetAliasesAction.java index 9c1475136a8..a1088d4fbcd 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/alias/get/TransportGetAliasesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/alias/get/TransportGetAliasesAction.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.alias.get; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -36,7 +36,7 @@ import java.util.List; /** */ -public class TransportGetAliasesAction extends TransportMasterNodeReadOperationAction { +public class TransportGetAliasesAction extends TransportMasterNodeReadAction { @Inject public TransportGetAliasesAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters) { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java index 323d8869024..cf471ab0c77 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java @@ -19,8 +19,7 @@ package org.elasticsearch.action.admin.indices.cache.clear; -import org.elasticsearch.Version; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -29,7 +28,7 @@ import java.io.IOException; /** * */ -public class ClearIndicesCacheRequest extends BroadcastOperationRequest { +public class ClearIndicesCacheRequest extends BroadcastRequest { private boolean filterCache = false; private boolean fieldDataCache = false; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java index a9f094892d4..cd3355cae87 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.cache.clear; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import java.util.List; * * */ -public class ClearIndicesCacheResponse extends BroadcastOperationResponse { +public class ClearIndicesCacheResponse extends BroadcastResponse { ClearIndicesCacheResponse() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheRequest.java index 46044b7862d..8aefde1eb70 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheRequest.java @@ -19,8 +19,7 @@ package org.elasticsearch.action.admin.indices.cache.clear; -import org.elasticsearch.Version; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -30,7 +29,7 @@ import java.io.IOException; /** * */ -class ShardClearIndicesCacheRequest extends BroadcastShardOperationRequest { +class ShardClearIndicesCacheRequest extends BroadcastShardRequest { private boolean filterCache = false; private boolean fieldDataCache = false; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheResponse.java index d89bfe088f6..c2931df6003 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ShardClearIndicesCacheResponse.java @@ -19,13 +19,13 @@ package org.elasticsearch.action.admin.indices.cache.clear; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.index.shard.ShardId; /** * */ -class ShardClearIndicesCacheResponse extends BroadcastShardOperationResponse { +class ShardClearIndicesCacheResponse extends BroadcastShardResponse { ShardClearIndicesCacheResponse() { } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java index 8e356f2fd84..88595c70647 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/TransportClearIndicesCacheAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -47,7 +47,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * Indices clear cache action. */ -public class TransportClearIndicesCacheAction extends TransportBroadcastOperationAction { +public class TransportClearIndicesCacheAction extends TransportBroadcastAction { private final IndicesService indicesService; private final IndicesQueryCache indicesQueryCache; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/close/TransportCloseIndexAction.java b/src/main/java/org/elasticsearch/action/admin/indices/close/TransportCloseIndexAction.java index 43343e83894..26a7fa1ffdf 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/close/TransportCloseIndexAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/close/TransportCloseIndexAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.indices.close; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DestructiveOperations; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -38,7 +38,7 @@ import org.elasticsearch.transport.TransportService; /** * Close index action */ -public class TransportCloseIndexAction extends TransportMasterNodeOperationAction { +public class TransportCloseIndexAction extends TransportMasterNodeAction { private final MetaDataIndexStateService indexStateService; private final DestructiveOperations destructiveOperations; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/create/TransportCreateIndexAction.java b/src/main/java/org/elasticsearch/action/admin/indices/create/TransportCreateIndexAction.java index eca8894e43d..9c671cc9505 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/create/TransportCreateIndexAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/create/TransportCreateIndexAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.create; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportService; /** * Create index action. */ -public class TransportCreateIndexAction extends TransportMasterNodeOperationAction { +public class TransportCreateIndexAction extends TransportMasterNodeAction { private final MetaDataCreateIndexService createIndexService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequest.java index c52fc57e653..3720f5fe78b 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequest.java @@ -23,7 +23,7 @@ import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequest; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.unit.TimeValue; @@ -37,7 +37,7 @@ import static org.elasticsearch.common.unit.TimeValue.readTimeValue; /** * A request to delete an index. Best created with {@link org.elasticsearch.client.Requests#deleteIndexRequest(String)}. */ -public class DeleteIndexRequest extends MasterNodeOperationRequest implements IndicesRequest.Replaceable { +public class DeleteIndexRequest extends MasterNodeRequest implements IndicesRequest.Replaceable { private String[] indices; // Delete index should work by default on both open and closed indices. diff --git a/src/main/java/org/elasticsearch/action/admin/indices/delete/TransportDeleteIndexAction.java b/src/main/java/org/elasticsearch/action/admin/indices/delete/TransportDeleteIndexAction.java index 4c0de6d799b..a25b56eef47 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/delete/TransportDeleteIndexAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/delete/TransportDeleteIndexAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.indices.delete; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DestructiveOperations; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -38,7 +38,7 @@ import org.elasticsearch.transport.TransportService; /** * Delete index action. */ -public class TransportDeleteIndexAction extends TransportMasterNodeOperationAction { +public class TransportDeleteIndexAction extends TransportMasterNodeAction { private final MetaDataDeleteIndexService deleteIndexService; private final DestructiveOperations destructiveOperations; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequest.java index e104090e962..e822f45e7f6 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequest.java @@ -19,11 +19,10 @@ package org.elasticsearch.action.admin.indices.exists.indices; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +31,7 @@ import java.io.IOException; import static org.elasticsearch.action.ValidateActions.addValidationError; -public class IndicesExistsRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public class IndicesExistsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices = Strings.EMPTY_ARRAY; private IndicesOptions indicesOptions = IndicesOptions.fromOptions(false, false, true, true); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java b/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java index 0c360468e98..019e8c2f34b 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/TransportIndicesExistsAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.indices.exists.indices; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -36,7 +36,7 @@ import org.elasticsearch.transport.TransportService; /** * Indices exists action. */ -public class TransportIndicesExistsAction extends TransportMasterNodeReadOperationAction { +public class TransportIndicesExistsAction extends TransportMasterNodeReadAction { @Inject public TransportIndicesExistsAction(Settings settings, TransportService transportService, ClusterService clusterService, diff --git a/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TransportTypesExistsAction.java b/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TransportTypesExistsAction.java index fb617f233d3..ef1dc16b190 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TransportTypesExistsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TransportTypesExistsAction.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.exists.types; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -35,7 +35,7 @@ import org.elasticsearch.transport.TransportService; /** * Types exists transport action. */ -public class TransportTypesExistsAction extends TransportMasterNodeReadOperationAction { +public class TransportTypesExistsAction extends TransportMasterNodeReadAction { @Inject public TransportTypesExistsAction(Settings settings, TransportService transportService, ClusterService clusterService, diff --git a/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequest.java index 868f32a7a78..8eeb7422bf3 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequest.java @@ -18,11 +18,10 @@ */ package org.elasticsearch.action.admin.indices.exists.types; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +31,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** */ -public class TypesExistsRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public class TypesExistsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices; private String[] types; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java index e34ac8cfab5..57d9455ff91 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequest.java @@ -19,9 +19,8 @@ package org.elasticsearch.action.admin.indices.flush; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -38,7 +37,7 @@ import java.io.IOException; * @see org.elasticsearch.client.IndicesAdminClient#flush(FlushRequest) * @see FlushResponse */ -public class FlushRequest extends BroadcastOperationRequest { +public class FlushRequest extends BroadcastRequest { private boolean force = false; private boolean waitIfOngoing = false; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushResponse.java index c4c52e7071c..a158b02611b 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.flush; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import java.util.List; * * */ -public class FlushResponse extends BroadcastOperationResponse { +public class FlushResponse extends BroadcastResponse { FlushResponse() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java index 55153562c15..0e38181fa61 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java @@ -19,8 +19,7 @@ package org.elasticsearch.action.admin.indices.flush; -import org.elasticsearch.Version; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -30,7 +29,7 @@ import java.io.IOException; /** * */ -class ShardFlushRequest extends BroadcastShardOperationRequest { +class ShardFlushRequest extends BroadcastShardRequest { private FlushRequest request = new FlushRequest(); ShardFlushRequest() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushResponse.java index 3ba91768732..6f2cc6a5522 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushResponse.java @@ -19,13 +19,13 @@ package org.elasticsearch.action.admin.indices.flush; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.index.shard.ShardId; /** * */ -class ShardFlushResponse extends BroadcastShardOperationResponse { +class ShardFlushResponse extends BroadcastShardResponse { ShardFlushResponse() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java index c9f637e4371..e546d6f616b 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/TransportFlushAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -45,7 +45,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * Flush Action. */ -public class TransportFlushAction extends TransportBroadcastOperationAction { +public class TransportFlushAction extends TransportBroadcastAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingAction.java b/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingAction.java index 9772754d330..1f853b6b397 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/TransportPutMappingAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.mapping.put; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -36,7 +36,7 @@ import org.elasticsearch.transport.TransportService; /** * Put mapping action. */ -public class TransportPutMappingAction extends TransportMasterNodeOperationAction { +public class TransportPutMappingAction extends TransportMasterNodeAction { private final MetaDataMappingService metaDataMappingService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/open/TransportOpenIndexAction.java b/src/main/java/org/elasticsearch/action/admin/indices/open/TransportOpenIndexAction.java index 83063492c07..1df33c56463 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/open/TransportOpenIndexAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/open/TransportOpenIndexAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.indices.open; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DestructiveOperations; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -38,7 +38,7 @@ import org.elasticsearch.transport.TransportService; /** * Open index action */ -public class TransportOpenIndexAction extends TransportMasterNodeOperationAction { +public class TransportOpenIndexAction extends TransportMasterNodeAction { private final MetaDataIndexStateService indexStateService; private final DestructiveOperations destructiveOperations; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java index d5b822f58cb..3510a3b7f96 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java @@ -19,8 +19,7 @@ package org.elasticsearch.action.admin.indices.optimize; -import org.elasticsearch.Version; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -37,7 +36,7 @@ import java.io.IOException; * @see org.elasticsearch.client.IndicesAdminClient#optimize(OptimizeRequest) * @see OptimizeResponse */ -public class OptimizeRequest extends BroadcastOperationRequest { +public class OptimizeRequest extends BroadcastRequest { public static final class Defaults { public static final int MAX_NUM_SEGMENTS = -1; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeResponse.java index d4a189eb7f4..88341ef2619 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.optimize; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import java.util.List; * * */ -public class OptimizeResponse extends BroadcastOperationResponse { +public class OptimizeResponse extends BroadcastResponse { OptimizeResponse() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java index 9113581038b..05aeabe21a6 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java @@ -20,8 +20,7 @@ package org.elasticsearch.action.admin.indices.optimize; -import org.elasticsearch.Version; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -31,7 +30,7 @@ import java.io.IOException; /** * */ -final class ShardOptimizeRequest extends BroadcastShardOperationRequest { +final class ShardOptimizeRequest extends BroadcastShardRequest { private OptimizeRequest request = new OptimizeRequest(); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeResponse.java index 61adb62f1d6..1c9dc4482d9 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeResponse.java @@ -19,13 +19,13 @@ package org.elasticsearch.action.admin.indices.optimize; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.index.shard.ShardId; /** * */ -class ShardOptimizeResponse extends BroadcastShardOperationResponse { +class ShardOptimizeResponse extends BroadcastShardResponse { ShardOptimizeResponse() { } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java b/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java index c4f276126fa..17a18bae971 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/optimize/TransportOptimizeAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -45,7 +45,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * Optimize index/indices action. */ -public class TransportOptimizeAction extends TransportBroadcastOperationAction { +public class TransportOptimizeAction extends TransportBroadcastAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequest.java index f2a97ef5fb5..8878713765b 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequest.java @@ -19,17 +19,17 @@ package org.elasticsearch.action.admin.indices.recovery; -import java.io.IOException; - -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; +import java.io.IOException; + /** * Request for recovery information */ -public class RecoveryRequest extends BroadcastOperationRequest { +public class RecoveryRequest extends BroadcastRequest { private boolean detailed = false; // Provides extra details in the response private boolean activeOnly = false; // Only reports on active recoveries diff --git a/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryResponse.java index 9fd15cd371e..fea33688c14 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.recovery; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ToXContent; @@ -35,7 +35,7 @@ import java.util.Map; /** * Information regarding the recovery state of indices and their associated shards. */ -public class RecoveryResponse extends BroadcastOperationResponse implements ToXContent { +public class RecoveryResponse extends BroadcastResponse implements ToXContent { private boolean detailed = false; private Map> shardResponses = new HashMap<>(); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/recovery/ShardRecoveryResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/recovery/ShardRecoveryResponse.java index 2e12de4f39f..a4104fbc449 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/recovery/ShardRecoveryResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/recovery/ShardRecoveryResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.indices.recovery; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -33,7 +33,7 @@ import java.io.IOException; /** * Information regarding the recovery state of a shard. */ -public class ShardRecoveryResponse extends BroadcastShardOperationResponse implements ToXContent { +public class ShardRecoveryResponse extends BroadcastShardResponse implements ToXContent { RecoveryState recoveryState; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/recovery/TransportRecoveryAction.java b/src/main/java/org/elasticsearch/action/admin/indices/recovery/TransportRecoveryAction.java index 2996247963f..2483efbc498 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/recovery/TransportRecoveryAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/recovery/TransportRecoveryAction.java @@ -23,8 +23,8 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -51,7 +51,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; * Transport action for shard recovery operation. This transport action does not actually * perform shard recovery, it only reports on recoveries (both active and complete). */ -public class TransportRecoveryAction extends TransportBroadcastOperationAction { +public class TransportRecoveryAction extends TransportBroadcastAction { private final IndicesService indicesService; @@ -149,7 +149,7 @@ public class TransportRecoveryAction extends TransportBroadcastOperationAction { +public class RefreshRequest extends BroadcastRequest { RefreshRequest() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/refresh/RefreshResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/refresh/RefreshResponse.java index 3130b0713da..28295fdd0a0 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/refresh/RefreshResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/refresh/RefreshResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.refresh; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import java.util.List; * * */ -public class RefreshResponse extends BroadcastOperationResponse { +public class RefreshResponse extends BroadcastResponse { RefreshResponse() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshRequest.java index da3c5fea9eb..37ea2cc46de 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshRequest.java @@ -19,17 +19,13 @@ package org.elasticsearch.action.admin.indices.refresh; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.index.shard.ShardId; -import java.io.IOException; - /** * */ -class ShardRefreshRequest extends BroadcastShardOperationRequest { +class ShardRefreshRequest extends BroadcastShardRequest { ShardRefreshRequest() { } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshResponse.java index c2ab17890eb..4de0f5877dd 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/refresh/ShardRefreshResponse.java @@ -19,13 +19,13 @@ package org.elasticsearch.action.admin.indices.refresh; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.index.shard.ShardId; /** * */ -class ShardRefreshResponse extends BroadcastShardOperationResponse { +class ShardRefreshResponse extends BroadcastShardResponse { ShardRefreshResponse() { } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java b/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java index 001793ecd17..e2fe442f951 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/refresh/TransportRefreshAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -45,7 +45,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * Refresh action. */ -public class TransportRefreshAction extends TransportBroadcastOperationAction { +public class TransportRefreshAction extends TransportBroadcastAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/seal/SealIndicesRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/seal/SealIndicesRequest.java index 42cdc51ed32..2e8e3ac0cf8 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/seal/SealIndicesRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/seal/SealIndicesRequest.java @@ -19,14 +19,14 @@ package org.elasticsearch.action.admin.indices.seal; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import java.util.Arrays; /** * A request to seal one or more indices. */ -public class SealIndicesRequest extends BroadcastOperationRequest { +public class SealIndicesRequest extends BroadcastRequest { SealIndicesRequest() { } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentResponse.java index 983e5350a5d..6b0dc8697f3 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentResponse.java @@ -24,7 +24,7 @@ import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.apache.lucene.util.Accountable; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -36,12 +36,11 @@ import org.elasticsearch.index.engine.Segment; import java.io.IOException; import java.util.Collection; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -public class IndicesSegmentResponse extends BroadcastOperationResponse implements ToXContent { +public class IndicesSegmentResponse extends BroadcastResponse implements ToXContent { private ShardSegments[] shards; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequest.java index cefc2ebc3bf..570fa89e026 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequest.java @@ -19,15 +19,14 @@ package org.elasticsearch.action.admin.indices.segments; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import java.io.IOException; -public class IndicesSegmentsRequest extends BroadcastOperationRequest { +public class IndicesSegmentsRequest extends BroadcastRequest { protected boolean verbose = false; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/segments/ShardSegments.java b/src/main/java/org/elasticsearch/action/admin/indices/segments/ShardSegments.java index 09d20271776..d33df00fc8c 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/segments/ShardSegments.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/segments/ShardSegments.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.segments; import com.google.common.collect.ImmutableList; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -33,7 +33,7 @@ import java.util.List; import static org.elasticsearch.cluster.routing.ImmutableShardRouting.readShardRoutingEntry; -public class ShardSegments extends BroadcastShardOperationResponse implements Iterable { +public class ShardSegments extends BroadcastShardResponse implements Iterable { private ShardRouting shardRouting; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java b/src/main/java/org/elasticsearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java index fa9639424b4..f043d8ebdb0 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/segments/TransportIndicesSegmentsAction.java @@ -23,8 +23,8 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -36,8 +36,8 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.IndexShard; +import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; @@ -51,7 +51,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * */ -public class TransportIndicesSegmentsAction extends TransportBroadcastOperationAction { +public class TransportIndicesSegmentsAction extends TransportBroadcastAction { private final IndicesService indicesService; @@ -122,7 +122,7 @@ public class TransportIndicesSegmentsAction extends TransportBroadcastOperationA return new ShardSegments(indexShard.routingEntry(), indexShard.engine().segments(request.verbose)); } - static class IndexShardSegmentRequest extends BroadcastShardOperationRequest { + static class IndexShardSegmentRequest extends BroadcastShardRequest { boolean verbose; IndexShardSegmentRequest() { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequest.java index 2f01e28f969..daf011ece62 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequest.java @@ -19,12 +19,11 @@ package org.elasticsearch.action.admin.indices.settings.get; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.ValidateActions; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -33,7 +32,7 @@ import java.io.IOException; /** */ -public class GetSettingsRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public class GetSettingsRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices = Strings.EMPTY_ARRAY; private IndicesOptions indicesOptions = IndicesOptions.fromOptions(false, true, true, true); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/settings/get/TransportGetSettingsAction.java b/src/main/java/org/elasticsearch/action/admin/indices/settings/get/TransportGetSettingsAction.java index c3a8948d1bb..f48b2c4853f 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/settings/get/TransportGetSettingsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/settings/get/TransportGetSettingsAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.settings.get; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -40,7 +40,7 @@ import java.util.Map; /** */ -public class TransportGetSettingsAction extends TransportMasterNodeReadOperationAction { +public class TransportGetSettingsAction extends TransportMasterNodeReadAction { private final SettingsFilter settingsFilter; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java b/src/main/java/org/elasticsearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java index 8185badb5af..1278b97934b 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.settings.put; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse; @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportService; /** * */ -public class TransportUpdateSettingsAction extends TransportMasterNodeOperationAction { +public class TransportUpdateSettingsAction extends TransportMasterNodeAction { private final MetaDataUpdateSettingsService updateSettingsService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequest.java index b8a94ab4d51..a99c0f52def 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.stats; import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags.Flag; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -34,7 +34,7 @@ import java.io.IOException; *

    All the stats to be returned can be cleared using {@link #clear()}, at which point, specific * stats can be enabled. */ -public class IndicesStatsRequest extends BroadcastOperationRequest { +public class IndicesStatsRequest extends BroadcastRequest { private CommonStatsFlags flags = new CommonStatsFlags(); diff --git a/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponse.java index f2f10c48f0a..2d9bf1e78f9 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsResponse.java @@ -24,7 +24,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.io.stream.StreamInput; @@ -41,7 +41,7 @@ import java.util.Set; /** */ -public class IndicesStatsResponse extends BroadcastOperationResponse implements ToXContent { +public class IndicesStatsResponse extends BroadcastResponse implements ToXContent { private ShardStats[] shards; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/stats/ShardStats.java b/src/main/java/org/elasticsearch/action/admin/indices/stats/ShardStats.java index 951c4b95223..fbba68cbee9 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/stats/ShardStats.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/stats/ShardStats.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.indices.stats; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; @@ -36,7 +36,7 @@ import static org.elasticsearch.cluster.routing.ImmutableShardRouting.readShardR /** */ -public class ShardStats extends BroadcastShardOperationResponse implements ToXContent { +public class ShardStats extends BroadcastShardResponse implements ToXContent { private ShardRouting shardRouting; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java b/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java index 75191bb903f..b4b0d6a4435 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/stats/TransportIndicesStatsAction.java @@ -24,8 +24,8 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -52,7 +52,7 @@ import static com.google.common.collect.Lists.newArrayList; /** */ -public class TransportIndicesStatsAction extends TransportBroadcastOperationAction { +public class TransportIndicesStatsAction extends TransportBroadcastAction { private final IndicesService indicesService; @@ -190,7 +190,7 @@ public class TransportIndicesStatsAction extends TransportBroadcastOperationActi return new ShardStats(indexShard, indexShard.routingEntry(), flags); } - static class IndexShardStatsRequest extends BroadcastShardOperationRequest { + static class IndexShardStatsRequest extends BroadcastShardRequest { // TODO if there are many indices, the request might hold a large indices array..., we don't really need to serialize it IndicesStatsRequest request; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java index 08801434868..42907787803 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.indices.template.delete; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * A request to delete an index template. */ -public class DeleteIndexTemplateRequest extends MasterNodeOperationRequest { +public class DeleteIndexTemplateRequest extends MasterNodeRequest { private String name; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java b/src/main/java/org/elasticsearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java index c1a063e6662..d66b0bb0a96 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/delete/TransportDeleteIndexTemplateAction.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.template.delete; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -34,7 +34,7 @@ import org.elasticsearch.transport.TransportService; /** * Delete index action. */ -public class TransportDeleteIndexTemplateAction extends TransportMasterNodeOperationAction { +public class TransportDeleteIndexTemplateAction extends TransportMasterNodeAction { private final MetaDataIndexTemplateService indexTemplateService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java index 949944fa61e..aeefc63bfa0 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequest.java @@ -18,9 +18,8 @@ */ package org.elasticsearch.action.admin.indices.template.get; -import org.elasticsearch.Version; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +31,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * Request that allows to retrieve index templates */ -public class GetIndexTemplatesRequest extends MasterNodeReadOperationRequest { +public class GetIndexTemplatesRequest extends MasterNodeReadRequest { private String[] names; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java b/src/main/java/org/elasticsearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java index c2600112542..039ca1a726f 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/get/TransportGetIndexTemplatesAction.java @@ -22,7 +22,7 @@ import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import com.google.common.collect.Lists; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -39,7 +39,7 @@ import java.util.List; /** * */ -public class TransportGetIndexTemplatesAction extends TransportMasterNodeReadOperationAction { +public class TransportGetIndexTemplatesAction extends TransportMasterNodeReadAction { @Inject public TransportGetIndexTemplatesAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters) { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java index 6e21ba4753f..a4b10cb7783 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java @@ -25,7 +25,7 @@ import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.admin.indices.alias.Alias; import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; @@ -50,7 +50,7 @@ import static org.elasticsearch.common.settings.Settings.writeSettingsToStream; /** * A request to create an index template. */ -public class PutIndexTemplateRequest extends MasterNodeOperationRequest implements IndicesRequest { +public class PutIndexTemplateRequest extends MasterNodeRequest implements IndicesRequest { private String name; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java b/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java index 5c4979e6253..492dbf352c7 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/template/put/TransportPutIndexTemplateAction.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.template.put; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -34,7 +34,7 @@ import org.elasticsearch.transport.TransportService; /** * Put index template action. */ -public class TransportPutIndexTemplateAction extends TransportMasterNodeOperationAction { +public class TransportPutIndexTemplateAction extends TransportMasterNodeAction { private final MetaDataIndexTemplateService indexTemplateService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java index 7b771f32091..648ab21afd6 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.indices.validate.query; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; @@ -32,7 +32,7 @@ import java.io.IOException; /** * Internal validate request executed directly against a specific index shard. */ -class ShardValidateQueryRequest extends BroadcastShardOperationRequest { +class ShardValidateQueryRequest extends BroadcastShardRequest { private BytesReference source; private String[] types = Strings.EMPTY_ARRAY; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java index d4e75578f1f..43d3ad82305 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ShardValidateQueryResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.indices.validate.query; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -31,7 +31,7 @@ import java.io.IOException; * * */ -class ShardValidateQueryResponse extends BroadcastShardOperationResponse { +class ShardValidateQueryResponse extends BroadcastShardResponse { private boolean valid; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/TransportValidateQueryAction.java b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/TransportValidateQueryAction.java index baa4949d29d..5d8e98beac1 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/TransportValidateQueryAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/TransportValidateQueryAction.java @@ -27,7 +27,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cache.recycler.PageCacheRecycler; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -63,7 +63,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * */ -public class TransportValidateQueryAction extends TransportBroadcastOperationAction { +public class TransportValidateQueryAction extends TransportBroadcastAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequest.java index d5612235995..3499852c515 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequest.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.QuerySourceBuilder; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.client.Requests; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesArray; @@ -44,7 +44,7 @@ import java.util.Map; *

    The request requires the query source to be set either using {@link #source(QuerySourceBuilder)}, * or {@link #source(byte[])}. */ -public class ValidateQueryRequest extends BroadcastOperationRequest { +public class ValidateQueryRequest extends BroadcastRequest { private BytesReference source; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryResponse.java index 6c0a065d3d2..3d1ef78d2bf 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryResponse.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.validate.query; import com.google.common.collect.ImmutableList; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -36,7 +36,7 @@ import static org.elasticsearch.action.admin.indices.validate.query.QueryExplana * * */ -public class ValidateQueryResponse extends BroadcastOperationResponse { +public class ValidateQueryResponse extends BroadcastResponse { private boolean valid; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/warmer/delete/TransportDeleteWarmerAction.java b/src/main/java/org/elasticsearch/action/admin/indices/warmer/delete/TransportDeleteWarmerAction.java index bcf3bad07fc..9e135e9a715 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/warmer/delete/TransportDeleteWarmerAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/warmer/delete/TransportDeleteWarmerAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.warmer.delete; import com.google.common.collect.Lists; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.AckedClusterStateUpdateTask; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -47,7 +47,7 @@ import java.util.List; * * Note: this is an internal API and should not be used / called by any client code. */ -public class TransportDeleteWarmerAction extends TransportMasterNodeOperationAction { +public class TransportDeleteWarmerAction extends TransportMasterNodeAction { @Inject public TransportDeleteWarmerAction(Settings settings, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters) { diff --git a/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java b/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java index e92eb3195d7..0b11e0bcf5d 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/warmer/put/TransportPutWarmerAction.java @@ -25,7 +25,7 @@ import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.TransportSearchAction; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeAction; import org.elasticsearch.cluster.AckedClusterStateUpdateTask; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -51,7 +51,7 @@ import java.util.List; * * Note: this is an internal API and should not be used / called by any client code. */ -public class TransportPutWarmerAction extends TransportMasterNodeOperationAction { +public class TransportPutWarmerAction extends TransportMasterNodeAction { private final TransportSearchAction searchAction; diff --git a/src/main/java/org/elasticsearch/action/count/CountRequest.java b/src/main/java/org/elasticsearch/action/count/CountRequest.java index dfee07b2ee9..1d35af42e53 100644 --- a/src/main/java/org/elasticsearch/action/count/CountRequest.java +++ b/src/main/java/org/elasticsearch/action/count/CountRequest.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.count; import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.support.QuerySourceBuilder; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.client.Requests; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; @@ -52,7 +52,7 @@ import static org.elasticsearch.search.internal.SearchContext.DEFAULT_TERMINATE_ * @see org.elasticsearch.client.Client#count(CountRequest) * @see org.elasticsearch.client.Requests#countRequest(String...) */ -public class CountRequest extends BroadcastOperationRequest { +public class CountRequest extends BroadcastRequest { public static final float DEFAULT_MIN_SCORE = -1f; diff --git a/src/main/java/org/elasticsearch/action/count/CountResponse.java b/src/main/java/org/elasticsearch/action/count/CountResponse.java index 91fd77e596b..916c4ef9373 100644 --- a/src/main/java/org/elasticsearch/action/count/CountResponse.java +++ b/src/main/java/org/elasticsearch/action/count/CountResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.count; import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.rest.RestStatus; @@ -31,7 +31,7 @@ import java.util.Arrays; /** * The response of the count action. */ -public class CountResponse extends BroadcastOperationResponse { +public class CountResponse extends BroadcastResponse { private final boolean terminatedEarly; private final long count; diff --git a/src/main/java/org/elasticsearch/action/exists/ExistsRequest.java b/src/main/java/org/elasticsearch/action/exists/ExistsRequest.java index 84c5d32aaf5..32ff0b1e014 100644 --- a/src/main/java/org/elasticsearch/action/exists/ExistsRequest.java +++ b/src/main/java/org/elasticsearch/action/exists/ExistsRequest.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.exists; import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.support.QuerySourceBuilder; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.client.Requests; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; @@ -38,7 +38,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Map; -public class ExistsRequest extends BroadcastOperationRequest { +public class ExistsRequest extends BroadcastRequest { public static final float DEFAULT_MIN_SCORE = -1f; private float minScore = DEFAULT_MIN_SCORE; diff --git a/src/main/java/org/elasticsearch/action/exists/ExistsResponse.java b/src/main/java/org/elasticsearch/action/exists/ExistsResponse.java index 6b1c58990dd..f271dc65f7f 100644 --- a/src/main/java/org/elasticsearch/action/exists/ExistsResponse.java +++ b/src/main/java/org/elasticsearch/action/exists/ExistsResponse.java @@ -20,14 +20,14 @@ package org.elasticsearch.action.exists; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import java.io.IOException; import java.util.List; -public class ExistsResponse extends BroadcastOperationResponse { +public class ExistsResponse extends BroadcastResponse { private boolean exists = false; diff --git a/src/main/java/org/elasticsearch/action/exists/ShardExistsRequest.java b/src/main/java/org/elasticsearch/action/exists/ShardExistsRequest.java index a8f8bff91fa..276e6ea117e 100644 --- a/src/main/java/org/elasticsearch/action/exists/ShardExistsRequest.java +++ b/src/main/java/org/elasticsearch/action/exists/ShardExistsRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.exists; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; @@ -29,7 +29,7 @@ import org.elasticsearch.index.shard.ShardId; import java.io.IOException; -class ShardExistsRequest extends BroadcastShardOperationRequest { +class ShardExistsRequest extends BroadcastShardRequest { private float minScore; diff --git a/src/main/java/org/elasticsearch/action/exists/ShardExistsResponse.java b/src/main/java/org/elasticsearch/action/exists/ShardExistsResponse.java index e94330c042f..25f813ee424 100644 --- a/src/main/java/org/elasticsearch/action/exists/ShardExistsResponse.java +++ b/src/main/java/org/elasticsearch/action/exists/ShardExistsResponse.java @@ -19,14 +19,14 @@ package org.elasticsearch.action.exists; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; import java.io.IOException; -class ShardExistsResponse extends BroadcastShardOperationResponse { +class ShardExistsResponse extends BroadcastShardResponse { private boolean exists; diff --git a/src/main/java/org/elasticsearch/action/exists/TransportExistsAction.java b/src/main/java/org/elasticsearch/action/exists/TransportExistsAction.java index cf4e41ce965..f9118e8c05a 100644 --- a/src/main/java/org/elasticsearch/action/exists/TransportExistsAction.java +++ b/src/main/java/org/elasticsearch/action/exists/TransportExistsAction.java @@ -25,7 +25,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cache.recycler.PageCacheRecycler; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -39,8 +39,8 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.lucene.Lucene; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.BigArrays; -import org.elasticsearch.index.query.QueryParseContext; import org.elasticsearch.index.IndexService; +import org.elasticsearch.index.query.QueryParseContext; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.script.ScriptService; @@ -61,7 +61,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; import static com.google.common.collect.Lists.newArrayList; import static org.elasticsearch.action.exists.ExistsRequest.DEFAULT_MIN_SCORE; -public class TransportExistsAction extends TransportBroadcastOperationAction { +public class TransportExistsAction extends TransportBroadcastAction { private final IndicesService indicesService; private final ScriptService scriptService; diff --git a/src/main/java/org/elasticsearch/action/explain/ExplainRequest.java b/src/main/java/org/elasticsearch/action/explain/ExplainRequest.java index f1b7b571833..8a8eaee36cf 100644 --- a/src/main/java/org/elasticsearch/action/explain/ExplainRequest.java +++ b/src/main/java/org/elasticsearch/action/explain/ExplainRequest.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.explain; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; import org.elasticsearch.action.support.QuerySourceBuilder; -import org.elasticsearch.action.support.single.shard.SingleShardOperationRequest; +import org.elasticsearch.action.support.single.shard.SingleShardRequest; import org.elasticsearch.client.Requests; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; @@ -35,7 +35,7 @@ import java.io.IOException; /** * Explain request encapsulating the explain query and document identifier to get an explanation for. */ -public class ExplainRequest extends SingleShardOperationRequest { +public class ExplainRequest extends SingleShardRequest { private String type = "_all"; private String id; diff --git a/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java b/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java index c2ca4c7558a..8cfba3dd1ce 100644 --- a/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java +++ b/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java @@ -25,7 +25,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.RoutingMissingException; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction; +import org.elasticsearch.action.support.single.shard.TransportSingleShardAction; import org.elasticsearch.cache.recycler.PageCacheRecycler; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -33,13 +33,13 @@ import org.elasticsearch.cluster.routing.ShardIterator; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.BigArrays; +import org.elasticsearch.index.IndexService; import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.get.GetResult; import org.elasticsearch.index.mapper.Uid; import org.elasticsearch.index.mapper.internal.UidFieldMapper; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.IndexShard; +import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.script.ScriptService; import org.elasticsearch.search.internal.DefaultSearchContext; @@ -56,7 +56,7 @@ import java.io.IOException; * Explain transport action. Computes the explain on the targeted shard. */ // TODO: AggregatedDfs. Currently the idf can be different then when executing a normal search with explain. -public class TransportExplainAction extends TransportShardSingleOperationAction { +public class TransportExplainAction extends TransportSingleShardAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java index ff61fe88ee9..e157865ecdf 100644 --- a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java +++ b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsRequest.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.fieldstats; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -29,7 +29,7 @@ import java.io.IOException; /** */ -public class FieldStatsRequest extends BroadcastOperationRequest { +public class FieldStatsRequest extends BroadcastRequest { public final static String DEFAULT_LEVEL = "cluster"; diff --git a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsResponse.java b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsResponse.java index e6f69e9791a..a8f66ca56ea 100644 --- a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsResponse.java +++ b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.fieldstats; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -32,7 +32,7 @@ import java.util.Map; /** */ -public class FieldStatsResponse extends BroadcastOperationResponse { +public class FieldStatsResponse extends BroadcastResponse { private Map> indicesMergedFieldStats; diff --git a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardRequest.java b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardRequest.java index fb46ff66d3b..0ce83d99296 100644 --- a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardRequest.java +++ b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.fieldstats; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -28,7 +28,7 @@ import java.io.IOException; /** */ -public class FieldStatsShardRequest extends BroadcastShardOperationRequest { +public class FieldStatsShardRequest extends BroadcastShardRequest { private String[] fields; diff --git a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardResponse.java b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardResponse.java index ada4552e94c..c1094ce4d3e 100644 --- a/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardResponse.java +++ b/src/main/java/org/elasticsearch/action/fieldstats/FieldStatsShardResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.fieldstats; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -30,7 +30,7 @@ import java.util.Map; /** */ -public class FieldStatsShardResponse extends BroadcastShardOperationResponse { +public class FieldStatsShardResponse extends BroadcastShardResponse { private Map fieldStats; diff --git a/src/main/java/org/elasticsearch/action/fieldstats/TransportFieldStatsTransportAction.java b/src/main/java/org/elasticsearch/action/fieldstats/TransportFieldStatsTransportAction.java index 12a6f41e13d..43e78ec5b87 100644 --- a/src/main/java/org/elasticsearch/action/fieldstats/TransportFieldStatsTransportAction.java +++ b/src/main/java/org/elasticsearch/action/fieldstats/TransportFieldStatsTransportAction.java @@ -27,7 +27,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -47,10 +47,13 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.concurrent.atomic.AtomicReferenceArray; -public class TransportFieldStatsTransportAction extends TransportBroadcastOperationAction { +public class TransportFieldStatsTransportAction extends TransportBroadcastAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/get/GetRequest.java b/src/main/java/org/elasticsearch/action/get/GetRequest.java index 6a8497ace71..1d2769017bc 100644 --- a/src/main/java/org/elasticsearch/action/get/GetRequest.java +++ b/src/main/java/org/elasticsearch/action/get/GetRequest.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.get; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.ValidateActions; -import org.elasticsearch.action.support.single.shard.SingleShardOperationRequest; +import org.elasticsearch.action.support.single.shard.SingleShardRequest; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -43,7 +43,7 @@ import java.io.IOException; * @see org.elasticsearch.client.Requests#getRequest(String) * @see org.elasticsearch.client.Client#get(GetRequest) */ -public class GetRequest extends SingleShardOperationRequest { +public class GetRequest extends SingleShardRequest { private String type; private String id; diff --git a/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java b/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java index eb3e25c1330..8a6d552807b 100644 --- a/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java +++ b/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java @@ -20,19 +20,15 @@ package org.elasticsearch.action.get; import com.carrotsearch.hppc.IntArrayList; -import com.carrotsearch.hppc.LongArrayList; -import org.elasticsearch.Version; -import org.elasticsearch.action.support.single.shard.SingleShardOperationRequest; +import org.elasticsearch.action.support.single.shard.SingleShardRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.search.fetch.source.FetchSourceContext; import java.io.IOException; import java.util.ArrayList; import java.util.List; -public class MultiGetShardRequest extends SingleShardOperationRequest { +public class MultiGetShardRequest extends SingleShardRequest { private int shardId; private String preference; diff --git a/src/main/java/org/elasticsearch/action/get/TransportGetAction.java b/src/main/java/org/elasticsearch/action/get/TransportGetAction.java index 2324835b9dc..08774a2b421 100644 --- a/src/main/java/org/elasticsearch/action/get/TransportGetAction.java +++ b/src/main/java/org/elasticsearch/action/get/TransportGetAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.get; import org.elasticsearch.action.RoutingMissingException; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction; +import org.elasticsearch.action.support.single.shard.TransportSingleShardAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; @@ -40,7 +40,7 @@ import org.elasticsearch.transport.TransportService; /** * Performs the get operation. */ -public class TransportGetAction extends TransportShardSingleOperationAction { +public class TransportGetAction extends TransportSingleShardAction { private final IndicesService indicesService; private final boolean realtime; diff --git a/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java b/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java index fb6bac8cdc8..fb1b751a9eb 100644 --- a/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java +++ b/src/main/java/org/elasticsearch/action/get/TransportShardMultiGetAction.java @@ -23,21 +23,21 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.TransportActions; -import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction; +import org.elasticsearch.action.support.single.shard.TransportSingleShardAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.ShardIterator; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.get.GetResult; import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.ShardId; +import org.elasticsearch.index.get.GetResult; import org.elasticsearch.index.shard.IndexShard; +import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -public class TransportShardMultiGetAction extends TransportShardSingleOperationAction { +public class TransportShardMultiGetAction extends TransportSingleShardAction { private static final String ACTION_NAME = MultiGetAction.NAME + "[shard]"; diff --git a/src/main/java/org/elasticsearch/action/percolate/PercolateRequest.java b/src/main/java/org/elasticsearch/action/percolate/PercolateRequest.java index f68745e0adf..9c9a3859585 100644 --- a/src/main/java/org/elasticsearch/action/percolate/PercolateRequest.java +++ b/src/main/java/org/elasticsearch/action/percolate/PercolateRequest.java @@ -24,7 +24,7 @@ import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.CompositeIndicesRequest; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.get.GetRequest; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.client.Requests; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; @@ -43,7 +43,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * A request to execute a percolate operation. */ -public class PercolateRequest extends BroadcastOperationRequest implements CompositeIndicesRequest { +public class PercolateRequest extends BroadcastRequest implements CompositeIndicesRequest { private String documentType; private String routing; @@ -55,7 +55,7 @@ public class PercolateRequest extends BroadcastOperationRequest, ToXContent { +public class PercolateResponse extends BroadcastResponse implements Iterable, ToXContent { public static final Match[] EMPTY = new Match[0]; diff --git a/src/main/java/org/elasticsearch/action/percolate/PercolateShardRequest.java b/src/main/java/org/elasticsearch/action/percolate/PercolateShardRequest.java index 8364eb1610d..f0b1a96e1d5 100644 --- a/src/main/java/org/elasticsearch/action/percolate/PercolateShardRequest.java +++ b/src/main/java/org/elasticsearch/action/percolate/PercolateShardRequest.java @@ -19,9 +19,8 @@ package org.elasticsearch.action.percolate; -import org.elasticsearch.Version; import org.elasticsearch.action.OriginalIndices; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -31,7 +30,7 @@ import java.io.IOException; /** */ -public class PercolateShardRequest extends BroadcastShardOperationRequest { +public class PercolateShardRequest extends BroadcastShardRequest { private String documentType; private BytesReference source; diff --git a/src/main/java/org/elasticsearch/action/percolate/PercolateShardResponse.java b/src/main/java/org/elasticsearch/action/percolate/PercolateShardResponse.java index b731208def7..c626cda581e 100644 --- a/src/main/java/org/elasticsearch/action/percolate/PercolateShardResponse.java +++ b/src/main/java/org/elasticsearch/action/percolate/PercolateShardResponse.java @@ -19,9 +19,8 @@ package org.elasticsearch.action.percolate; import com.google.common.collect.ImmutableList; - import org.apache.lucene.util.BytesRef; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -42,7 +41,7 @@ import java.util.Map; /** */ -public class PercolateShardResponse extends BroadcastShardOperationResponse { +public class PercolateShardResponse extends BroadcastShardResponse { private static final BytesRef[] EMPTY_MATCHES = new BytesRef[0]; private static final float[] EMPTY_SCORES = new float[0]; diff --git a/src/main/java/org/elasticsearch/action/percolate/TransportPercolateAction.java b/src/main/java/org/elasticsearch/action/percolate/TransportPercolateAction.java index d1ee7be3b19..622b541a0ea 100644 --- a/src/main/java/org/elasticsearch/action/percolate/TransportPercolateAction.java +++ b/src/main/java/org/elasticsearch/action/percolate/TransportPercolateAction.java @@ -26,7 +26,7 @@ import org.elasticsearch.action.get.TransportGetAction; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -52,7 +52,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * */ -public class TransportPercolateAction extends TransportBroadcastOperationAction { +public class TransportPercolateAction extends TransportBroadcastAction { private final PercolatorService percolatorService; private final TransportGetAction getAction; diff --git a/src/main/java/org/elasticsearch/action/percolate/TransportShardMultiPercolateAction.java b/src/main/java/org/elasticsearch/action/percolate/TransportShardMultiPercolateAction.java index ce38859174f..adca1883470 100644 --- a/src/main/java/org/elasticsearch/action/percolate/TransportShardMultiPercolateAction.java +++ b/src/main/java/org/elasticsearch/action/percolate/TransportShardMultiPercolateAction.java @@ -26,8 +26,8 @@ import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.OriginalIndices; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.TransportActions; -import org.elasticsearch.action.support.single.shard.SingleShardOperationRequest; -import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction; +import org.elasticsearch.action.support.single.shard.SingleShardRequest; +import org.elasticsearch.action.support.single.shard.TransportSingleShardAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.ShardIterator; @@ -49,7 +49,7 @@ import java.util.List; /** */ -public class TransportShardMultiPercolateAction extends TransportShardSingleOperationAction { +public class TransportShardMultiPercolateAction extends TransportSingleShardAction { private final PercolatorService percolatorService; @@ -108,7 +108,7 @@ public class TransportShardMultiPercolateAction extends TransportShardSingleOper } - public static class Request extends SingleShardOperationRequest implements IndicesRequest { + public static class Request extends SingleShardRequest implements IndicesRequest { private int shardId; private String preference; diff --git a/src/main/java/org/elasticsearch/action/suggest/ShardSuggestRequest.java b/src/main/java/org/elasticsearch/action/suggest/ShardSuggestRequest.java index d4c48e5034f..794dd9badf7 100644 --- a/src/main/java/org/elasticsearch/action/suggest/ShardSuggestRequest.java +++ b/src/main/java/org/elasticsearch/action/suggest/ShardSuggestRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.suggest; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -30,7 +30,7 @@ import java.io.IOException; /** * Internal suggest request executed directly against a specific index shard. */ -final class ShardSuggestRequest extends BroadcastShardOperationRequest { +final class ShardSuggestRequest extends BroadcastShardRequest { private BytesReference suggestSource; diff --git a/src/main/java/org/elasticsearch/action/suggest/ShardSuggestResponse.java b/src/main/java/org/elasticsearch/action/suggest/ShardSuggestResponse.java index f6495c60163..bca29800bd1 100644 --- a/src/main/java/org/elasticsearch/action/suggest/ShardSuggestResponse.java +++ b/src/main/java/org/elasticsearch/action/suggest/ShardSuggestResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.suggest; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -30,7 +30,7 @@ import java.io.IOException; /** * Internal suggest response of a shard suggest request executed directly against a specific shard. */ -class ShardSuggestResponse extends BroadcastShardOperationResponse { +class ShardSuggestResponse extends BroadcastShardResponse { private final Suggest suggest; diff --git a/src/main/java/org/elasticsearch/action/suggest/SuggestRequest.java b/src/main/java/org/elasticsearch/action/suggest/SuggestRequest.java index fdb5d7a0117..c75e262bac4 100644 --- a/src/main/java/org/elasticsearch/action/suggest/SuggestRequest.java +++ b/src/main/java/org/elasticsearch/action/suggest/SuggestRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.suggest; import org.elasticsearch.action.ActionRequestValidationException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.client.Requests; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; @@ -48,7 +48,7 @@ import java.util.Arrays; * @see org.elasticsearch.client.Requests#suggestRequest(String...) * @see org.elasticsearch.search.suggest.SuggestBuilders */ -public final class SuggestRequest extends BroadcastOperationRequest { +public final class SuggestRequest extends BroadcastRequest { @Nullable private String routing; diff --git a/src/main/java/org/elasticsearch/action/suggest/SuggestResponse.java b/src/main/java/org/elasticsearch/action/suggest/SuggestResponse.java index 24a8922c5f9..445e804b5b5 100644 --- a/src/main/java/org/elasticsearch/action/suggest/SuggestResponse.java +++ b/src/main/java/org/elasticsearch/action/suggest/SuggestResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.suggest; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -35,7 +35,7 @@ import static org.elasticsearch.common.xcontent.ToXContent.EMPTY_PARAMS; /** * The response of the suggest action. */ -public final class SuggestResponse extends BroadcastOperationResponse { +public final class SuggestResponse extends BroadcastResponse { private final Suggest suggest; diff --git a/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java b/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java index 9874783ae79..ac046e6552d 100644 --- a/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java +++ b/src/main/java/org/elasticsearch/action/suggest/TransportSuggestAction.java @@ -24,7 +24,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -36,8 +36,8 @@ import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.IndexService; +import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.suggest.stats.ShardSuggestService; import org.elasticsearch.indices.IndicesService; @@ -58,7 +58,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * Defines the transport of a suggestion request across the cluster */ -public class TransportSuggestAction extends TransportBroadcastOperationAction { +public class TransportSuggestAction extends TransportBroadcastAction { private final IndicesService indicesService; private final SuggestPhase suggestPhase; diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java index 50fb7b097f2..6170d967002 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java @@ -26,7 +26,7 @@ import org.elasticsearch.client.ElasticsearchClient; /** */ -public abstract class BroadcastOperationRequestBuilder, Response extends BroadcastOperationResponse, RequestBuilder extends BroadcastOperationRequestBuilder> +public abstract class BroadcastOperationRequestBuilder, Response extends BroadcastResponse, RequestBuilder extends BroadcastOperationRequestBuilder> extends ActionRequestBuilder { protected BroadcastOperationRequestBuilder(ElasticsearchClient client, Action action, Request request) { diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastRequest.java similarity index 88% rename from src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/broadcast/BroadcastRequest.java index 80eeacedbba..19adbdce01a 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastRequest.java @@ -31,20 +31,20 @@ import java.io.IOException; /** * */ -public abstract class BroadcastOperationRequest extends ActionRequest implements IndicesRequest.Replaceable { +public abstract class BroadcastRequest extends ActionRequest implements IndicesRequest.Replaceable { protected String[] indices; private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpenAndForbidClosed(); - protected BroadcastOperationRequest() { + protected BroadcastRequest() { } - protected BroadcastOperationRequest(ActionRequest originalRequest) { + protected BroadcastRequest(ActionRequest originalRequest) { super(originalRequest); } - protected BroadcastOperationRequest(String[] indices) { + protected BroadcastRequest(String[] indices) { this.indices = indices; } diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java similarity index 90% rename from src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java rename to src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java index e8e2a2aa0ce..560c7ec9869 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationResponse.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastResponse.java @@ -32,17 +32,17 @@ import static org.elasticsearch.action.support.DefaultShardOperationFailedExcept /** * Base class for all broadcast operation based responses. */ -public abstract class BroadcastOperationResponse extends ActionResponse { +public abstract class BroadcastResponse extends ActionResponse { private static final ShardOperationFailedException[] EMPTY = new ShardOperationFailedException[0]; private int totalShards; private int successfulShards; private int failedShards; private ShardOperationFailedException[] shardFailures = EMPTY; - protected BroadcastOperationResponse() { + protected BroadcastResponse() { } - protected BroadcastOperationResponse(int totalShards, int successfulShards, int failedShards, List shardFailures) { + protected BroadcastResponse(int totalShards, int successfulShards, int failedShards, List shardFailures) { this.totalShards = totalShards; this.successfulShards = successfulShards; this.failedShards = failedShards; @@ -73,7 +73,7 @@ public abstract class BroadcastOperationResponse extends ActionResponse { /** * The list of shard failures exception. */ - public ShardOperationFailedException[] getShardFailures() { + public ShardOperationFailedException[] getShardFailures() { return shardFailures; } diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardOperationRequest.java b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardRequest.java similarity index 86% rename from src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardRequest.java index f6c917fbf9b..e416cd517e1 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardRequest.java @@ -32,22 +32,22 @@ import java.io.IOException; /** * */ -public abstract class BroadcastShardOperationRequest extends TransportRequest implements IndicesRequest { +public abstract class BroadcastShardRequest extends TransportRequest implements IndicesRequest { private ShardId shardId; protected OriginalIndices originalIndices; - protected BroadcastShardOperationRequest() { + protected BroadcastShardRequest() { } - protected BroadcastShardOperationRequest(ShardId shardId, BroadcastOperationRequest request) { + protected BroadcastShardRequest(ShardId shardId, BroadcastRequest request) { super(request); this.shardId = shardId; this.originalIndices = new OriginalIndices(request); } - protected BroadcastShardOperationRequest(ShardId shardId, OriginalIndices originalIndices) { + protected BroadcastShardRequest(ShardId shardId, OriginalIndices originalIndices) { this.shardId = shardId; this.originalIndices = originalIndices; } diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardOperationResponse.java b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardResponse.java similarity index 89% rename from src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardOperationResponse.java rename to src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardResponse.java index cc0c64b532d..bf7d271bb6f 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardOperationResponse.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastShardResponse.java @@ -29,15 +29,15 @@ import java.io.IOException; /** * */ -public abstract class BroadcastShardOperationResponse extends TransportResponse { +public abstract class BroadcastShardResponse extends TransportResponse { ShardId shardId; - protected BroadcastShardOperationResponse() { + protected BroadcastShardResponse() { } - protected BroadcastShardOperationResponse(ShardId shardId) { + protected BroadcastShardResponse(ShardId shardId) { this.shardId = shardId; } diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java b/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastAction.java similarity index 95% rename from src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java rename to src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastAction.java index 6ff55467f7d..c77f3ec766b 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastAction.java @@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public abstract class TransportBroadcastOperationAction +public abstract class TransportBroadcastAction extends HandledTransportAction { protected final ThreadPool threadPool; @@ -52,8 +52,8 @@ public abstract class TransportBroadcastOperationAction request, Class shardRequest, String shardExecutor) { + protected TransportBroadcastAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, + Class request, Class shardRequest, String shardExecutor) { super(settings, actionName, threadPool, transportService, actionFilters, request); this.clusterService = clusterService; this.transportService = transportService; diff --git a/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequest.java b/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequest.java index ea3a1e43bff..870b1077456 100644 --- a/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequest.java +++ b/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequest.java @@ -33,7 +33,7 @@ import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds; * Abstract class that allows to mark action requests that support acknowledgements. * Facilitates consistency across different api. */ -public abstract class AcknowledgedRequest extends MasterNodeOperationRequest implements AckedRequest { +public abstract class AcknowledgedRequest extends MasterNodeRequest implements AckedRequest { public static final TimeValue DEFAULT_ACK_TIMEOUT = timeValueSeconds(30); diff --git a/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java b/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java index 5d7af81927b..0b3b5af36d2 100644 --- a/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java +++ b/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java @@ -22,15 +22,13 @@ package org.elasticsearch.action.support.master; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.client.ClusterAdminClient; import org.elasticsearch.client.ElasticsearchClient; -import org.elasticsearch.client.IndicesAdminClient; import org.elasticsearch.common.unit.TimeValue; /** * Base request builder for master node operations */ -public abstract class MasterNodeOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends MasterNodeOperationRequestBuilder> +public abstract class MasterNodeOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends MasterNodeOperationRequestBuilder> extends ActionRequestBuilder { protected MasterNodeOperationRequestBuilder(ElasticsearchClient client, Action action, Request request) { diff --git a/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java b/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java index 02c83298c25..7955abfbe96 100644 --- a/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java +++ b/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java @@ -21,14 +21,12 @@ package org.elasticsearch.action.support.master; import org.elasticsearch.action.Action; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.client.ClusterAdminClient; import org.elasticsearch.client.ElasticsearchClient; -import org.elasticsearch.client.IndicesAdminClient; /** * Base request builder for master node read operations that can be executed on the local node as well */ -public abstract class MasterNodeReadOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends MasterNodeReadOperationRequestBuilder> +public abstract class MasterNodeReadOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends MasterNodeReadOperationRequestBuilder> extends MasterNodeOperationRequestBuilder { protected MasterNodeReadOperationRequestBuilder(ElasticsearchClient client, Action action, Request request) { diff --git a/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequest.java b/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java similarity index 90% rename from src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java index df47cae3f1a..b190a6e93c4 100644 --- a/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java @@ -19,7 +19,6 @@ package org.elasticsearch.action.support.master; -import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -28,7 +27,7 @@ import java.io.IOException; /** * Base request for master based read operations that allows to read the cluster state from the local node if needed */ -public abstract class MasterNodeReadOperationRequest extends MasterNodeOperationRequest { +public abstract class MasterNodeReadRequest extends MasterNodeRequest { protected boolean local = false; diff --git a/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequest.java b/src/main/java/org/elasticsearch/action/support/master/MasterNodeRequest.java similarity index 90% rename from src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/master/MasterNodeRequest.java index e1e90e932ff..d3621cac58c 100644 --- a/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/master/MasterNodeRequest.java @@ -29,17 +29,17 @@ import java.io.IOException; /** * A based request for master based operation. */ -public abstract class MasterNodeOperationRequest extends ActionRequest { +public abstract class MasterNodeRequest extends ActionRequest { public static final TimeValue DEFAULT_MASTER_NODE_TIMEOUT = TimeValue.timeValueSeconds(30); protected TimeValue masterNodeTimeout = DEFAULT_MASTER_NODE_TIMEOUT; - protected MasterNodeOperationRequest() { + protected MasterNodeRequest() { } - protected MasterNodeOperationRequest(ActionRequest request) { + protected MasterNodeRequest(ActionRequest request) { super(request); } diff --git a/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java b/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java similarity index 94% rename from src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java rename to src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java index 9e1c662cf60..f8c0c07da58 100644 --- a/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeAction.java @@ -36,20 +36,23 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.discovery.MasterNotDiscoveredException; import org.elasticsearch.node.NodeClosedException; import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.*; +import org.elasticsearch.transport.BaseTransportResponseHandler; +import org.elasticsearch.transport.ConnectTransportException; +import org.elasticsearch.transport.TransportException; +import org.elasticsearch.transport.TransportService; /** * A base class for operations that needs to be performed on the master node. */ -public abstract class TransportMasterNodeOperationAction extends HandledTransportAction { +public abstract class TransportMasterNodeAction extends HandledTransportAction { protected final TransportService transportService; protected final ClusterService clusterService; final String executor; - protected TransportMasterNodeOperationAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, - Class request) { + protected TransportMasterNodeAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, + Class request) { super(settings, actionName, threadPool, transportService, actionFilters, request); this.transportService = transportService; this.clusterService = clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadOperationAction.java b/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java similarity index 80% rename from src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadOperationAction.java rename to src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java index 383de7ceb53..c33b9fde774 100644 --- a/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java @@ -30,13 +30,13 @@ import org.elasticsearch.transport.TransportService; * A base class for read operations that needs to be performed on the master node. * Can also be executed on the local node if needed. */ -public abstract class TransportMasterNodeReadOperationAction extends TransportMasterNodeOperationAction { +public abstract class TransportMasterNodeReadAction extends TransportMasterNodeAction { public static final String FORCE_LOCAL_SETTING = "action.master.force_local"; private Boolean forceLocal; - protected TransportMasterNodeReadOperationAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Class request) { + protected TransportMasterNodeReadAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Class request) { super(settings, actionName, transportService, clusterService, threadPool, actionFilters,request); this.forceLocal = settings.getAsBoolean(FORCE_LOCAL_SETTING, null); } diff --git a/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequest.java b/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequest.java index 5f0d34675b4..fbd095bb874 100644 --- a/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequest.java +++ b/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequest.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.support.master.info; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.MasterNodeReadOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -30,7 +30,7 @@ import java.io.IOException; /** */ -public abstract class ClusterInfoRequest extends MasterNodeReadOperationRequest implements IndicesRequest.Replaceable { +public abstract class ClusterInfoRequest extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] indices = Strings.EMPTY_ARRAY; private String[] types = Strings.EMPTY_ARRAY; diff --git a/src/main/java/org/elasticsearch/action/support/master/info/TransportClusterInfoAction.java b/src/main/java/org/elasticsearch/action/support/master/info/TransportClusterInfoAction.java index fdf6352ef18..d1bdb86e1bb 100644 --- a/src/main/java/org/elasticsearch/action/support/master/info/TransportClusterInfoAction.java +++ b/src/main/java/org/elasticsearch/action/support/master/info/TransportClusterInfoAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.support.master.info; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.common.settings.Settings; @@ -30,7 +30,7 @@ import org.elasticsearch.transport.TransportService; /** */ -public abstract class TransportClusterInfoAction extends TransportMasterNodeReadOperationAction { +public abstract class TransportClusterInfoAction extends TransportMasterNodeReadAction { public TransportClusterInfoAction(Settings settings, String actionName, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, Class request) { super(settings, actionName, transportService, clusterService, threadPool, actionFilters, request); diff --git a/src/main/java/org/elasticsearch/action/support/nodes/NodeOperationRequest.java b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodeRequest.java similarity index 88% rename from src/main/java/org/elasticsearch/action/support/nodes/NodeOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/nodes/BaseNodeRequest.java index 4d8a42619ad..e25577e2f70 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/NodeOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodeRequest.java @@ -28,15 +28,15 @@ import java.io.IOException; /** * */ -public abstract class NodeOperationRequest extends TransportRequest { +public abstract class BaseNodeRequest extends TransportRequest { private String nodeId; - protected NodeOperationRequest() { + protected BaseNodeRequest() { } - protected NodeOperationRequest(NodesOperationRequest request, String nodeId) { + protected BaseNodeRequest(BaseNodesRequest request, String nodeId) { super(request); this.nodeId = nodeId; } diff --git a/src/main/java/org/elasticsearch/action/support/nodes/NodeOperationResponse.java b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodeResponse.java similarity index 90% rename from src/main/java/org/elasticsearch/action/support/nodes/NodeOperationResponse.java rename to src/main/java/org/elasticsearch/action/support/nodes/BaseNodeResponse.java index 3415a07c8a2..33e4596e9b2 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/NodeOperationResponse.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodeResponse.java @@ -29,14 +29,14 @@ import java.io.IOException; /** * A base class for node level operations. */ -public abstract class NodeOperationResponse extends TransportResponse { +public abstract class BaseNodeResponse extends TransportResponse { private DiscoveryNode node; - protected NodeOperationResponse() { + protected BaseNodeResponse() { } - protected NodeOperationResponse(DiscoveryNode node) { + protected BaseNodeResponse(DiscoveryNode node) { assert node != null; this.node = node; } diff --git a/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequest.java b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodesRequest.java similarity index 90% rename from src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/nodes/BaseNodesRequest.java index 113e03f1f3c..462c873c633 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodesRequest.java @@ -31,7 +31,7 @@ import java.io.IOException; /** * */ -public abstract class NodesOperationRequest extends ActionRequest { +public abstract class BaseNodesRequest extends ActionRequest { public static String[] ALL_NODES = Strings.EMPTY_ARRAY; @@ -39,16 +39,16 @@ public abstract class NodesOperationRequest ext private TimeValue timeout; - protected NodesOperationRequest() { + protected BaseNodesRequest() { } - protected NodesOperationRequest(ActionRequest request, String... nodesIds) { + protected BaseNodesRequest(ActionRequest request, String... nodesIds) { super(request); this.nodesIds = nodesIds; } - protected NodesOperationRequest(String... nodesIds) { + protected BaseNodesRequest(String... nodesIds) { this.nodesIds = nodesIds; } diff --git a/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodesResponse.java similarity index 79% rename from src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java rename to src/main/java/org/elasticsearch/action/support/nodes/BaseNodesResponse.java index b2a699529bb..db0a2a89aa7 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationResponse.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/BaseNodesResponse.java @@ -34,16 +34,16 @@ import java.util.Map; /** * */ -public abstract class NodesOperationResponse extends ActionResponse implements Iterable { +public abstract class BaseNodesResponse extends ActionResponse implements Iterable { private ClusterName clusterName; - protected NodeResponse[] nodes; - private Map nodesMap; + protected TNodeResponse[] nodes; + private Map nodesMap; - protected NodesOperationResponse() { + protected BaseNodesResponse() { } - protected NodesOperationResponse(ClusterName clusterName, NodeResponse[] nodes) { + protected BaseNodesResponse(ClusterName clusterName, TNodeResponse[] nodes) { this.clusterName = clusterName; this.nodes = nodes; } @@ -64,23 +64,23 @@ public abstract class NodesOperationResponse iterator() { + public Iterator iterator() { return getNodesMap().values().iterator(); } - public Map getNodesMap() { + public Map getNodesMap() { if (nodesMap == null) { nodesMap = Maps.newHashMap(); - for (NodeResponse nodeResponse : nodes) { + for (TNodeResponse nodeResponse : nodes) { nodesMap.put(nodeResponse.getNode().id(), nodeResponse); } } diff --git a/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java b/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java index 303671db595..cf8190f2c32 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.unit.TimeValue; /** */ -public abstract class NodesOperationRequestBuilder, Response extends NodesOperationResponse, RequestBuilder extends NodesOperationRequestBuilder> +public abstract class NodesOperationRequestBuilder, Response extends BaseNodesResponse, RequestBuilder extends NodesOperationRequestBuilder> extends ActionRequestBuilder { protected NodesOperationRequestBuilder(ElasticsearchClient client, Action action, Request request) { diff --git a/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java b/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java similarity index 87% rename from src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java rename to src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java index 78503930357..065f4ad744a 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java @@ -39,7 +39,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public abstract class TransportNodesOperationAction extends HandledTransportAction { +public abstract class TransportNodesAction extends HandledTransportAction { protected final ClusterName clusterName; protected final ClusterService clusterService; @@ -47,9 +47,9 @@ public abstract class TransportNodesOperationAction request, Class nodeRequest, String nodeExecutor) { + protected TransportNodesAction(Settings settings, String actionName, ClusterName clusterName, ThreadPool threadPool, + ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, + Class request, Class nodeRequest, String nodeExecutor) { super(settings, actionName, threadPool, transportService, actionFilters, request); this.clusterName = clusterName; this.clusterService = clusterService; @@ -61,7 +61,7 @@ public abstract class TransportNodesOperationAction listener) { + protected void doExecute(NodesRequest request, ActionListener listener) { new AsyncAction(request, listener).start(); } @@ -69,9 +69,9 @@ public abstract class TransportNodesOperationAction listener; + private final ActionListener listener; private final ClusterState clusterState; private final AtomicReferenceArray responses; private final AtomicInteger counter = new AtomicInteger(); - private AsyncAction(Request request, ActionListener listener) { + private AsyncAction(NodesRequest request, ActionListener listener) { this.request = request; this.listener = listener; clusterState = clusterService.state(); @@ -179,7 +179,7 @@ public abstract class TransportNodesOperationAction, Response extends ActionResponse, RequestBuilder extends SingleShardOperationRequestBuilder> +public abstract class SingleShardOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends SingleShardOperationRequestBuilder> extends ActionRequestBuilder { protected SingleShardOperationRequestBuilder(ElasticsearchClient client, Action action, Request request) { diff --git a/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequest.java b/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardRequest.java similarity index 89% rename from src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequest.java rename to src/main/java/org/elasticsearch/action/support/single/shard/SingleShardRequest.java index 74db0435709..180ea877618 100644 --- a/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequest.java +++ b/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardRequest.java @@ -33,7 +33,7 @@ import java.io.IOException; /** * */ -public abstract class SingleShardOperationRequest extends ActionRequest implements IndicesRequest { +public abstract class SingleShardRequest extends ActionRequest implements IndicesRequest { ShardId internalShardId; @@ -41,18 +41,18 @@ public abstract class SingleShardOperationRequest extends TransportAction { +public abstract class TransportSingleShardAction extends TransportAction { protected final ClusterService clusterService; @@ -53,8 +53,8 @@ public abstract class TransportShardSingleOperationAction request, String executor) { + protected TransportSingleShardAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, + Class request, String executor) { super(settings, actionName, threadPool, actionFilters); this.clusterService = clusterService; this.transportService = transportService; diff --git a/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java b/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java index 96fdd91c84f..c33e32eabb4 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java +++ b/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsShardRequest.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.termvectors; import com.carrotsearch.hppc.IntArrayList; -import org.elasticsearch.action.support.single.shard.SingleShardOperationRequest; +import org.elasticsearch.action.support.single.shard.SingleShardRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -28,7 +28,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -public class MultiTermVectorsShardRequest extends SingleShardOperationRequest { +public class MultiTermVectorsShardRequest extends SingleShardRequest { private int shardId; private String preference; diff --git a/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java b/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java index 9198013d307..bc1332e4da3 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java +++ b/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java @@ -27,7 +27,7 @@ import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.DocumentRequest; import org.elasticsearch.action.ValidateActions; import org.elasticsearch.action.get.MultiGetRequest; -import org.elasticsearch.action.support.single.shard.SingleShardOperationRequest; +import org.elasticsearch.action.support.single.shard.SingleShardRequest; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.StreamInput; @@ -50,7 +50,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; * Note, the {@link #index()}, {@link #type(String)} and {@link #id(String)} are * required. */ -public class TermVectorsRequest extends SingleShardOperationRequest implements DocumentRequest { +public class TermVectorsRequest extends SingleShardRequest implements DocumentRequest { private String type; diff --git a/src/main/java/org/elasticsearch/action/termvectors/TransportShardMultiTermsVectorAction.java b/src/main/java/org/elasticsearch/action/termvectors/TransportShardMultiTermsVectorAction.java index f2e9a16d989..9aad9cb479b 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/TransportShardMultiTermsVectorAction.java +++ b/src/main/java/org/elasticsearch/action/termvectors/TransportShardMultiTermsVectorAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.TransportActions; -import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction; +import org.elasticsearch.action.support.single.shard.TransportSingleShardAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.ShardIterator; @@ -36,7 +36,7 @@ import org.elasticsearch.indices.IndicesService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; -public class TransportShardMultiTermsVectorAction extends TransportShardSingleOperationAction { +public class TransportShardMultiTermsVectorAction extends TransportSingleShardAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/termvectors/TransportTermVectorsAction.java b/src/main/java/org/elasticsearch/action/termvectors/TransportTermVectorsAction.java index e03abfee230..623ced5d5ef 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/TransportTermVectorsAction.java +++ b/src/main/java/org/elasticsearch/action/termvectors/TransportTermVectorsAction.java @@ -22,15 +22,15 @@ package org.elasticsearch.action.termvectors; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.RoutingMissingException; import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction; +import org.elasticsearch.action.support.single.shard.TransportSingleShardAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.ShardIterator; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.IndexShard; +import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; @@ -38,7 +38,7 @@ import org.elasticsearch.transport.TransportService; /** * Performs the get operation. */ -public class TransportTermVectorsAction extends TransportShardSingleOperationAction { +public class TransportTermVectorsAction extends TransportSingleShardAction { private final IndicesService indicesService; diff --git a/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyRequest.java b/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyRequest.java index db4624d7464..0171a90ec95 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyRequest.java +++ b/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyRequest.java @@ -24,7 +24,7 @@ import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.support.broadcast.BroadcastOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.XContentHelper; @@ -38,7 +38,7 @@ import java.util.Set; import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -public class DfsOnlyRequest extends BroadcastOperationRequest { +public class DfsOnlyRequest extends BroadcastRequest { private SearchRequest searchRequest = new SearchRequest(); diff --git a/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyResponse.java b/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyResponse.java index 150e7e2289b..db1cddff046 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyResponse.java +++ b/src/main/java/org/elasticsearch/action/termvectors/dfs/DfsOnlyResponse.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.termvectors.dfs; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.unit.TimeValue; @@ -32,7 +32,7 @@ import java.util.List; /** * A response of a dfs only request. */ -public class DfsOnlyResponse extends BroadcastOperationResponse { +public class DfsOnlyResponse extends BroadcastResponse { private AggregatedDfs dfs; private long tookInMillis; diff --git a/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyRequest.java b/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyRequest.java index c18892aed67..687910c5922 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyRequest.java +++ b/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyRequest.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.termvectors.dfs; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationRequest; +import org.elasticsearch.action.support.broadcast.BroadcastShardRequest; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; @@ -29,7 +29,7 @@ import org.elasticsearch.search.internal.ShardSearchTransportRequest; import java.io.IOException; -class ShardDfsOnlyRequest extends BroadcastShardOperationRequest { +class ShardDfsOnlyRequest extends BroadcastShardRequest { private ShardSearchTransportRequest shardSearchRequest = new ShardSearchTransportRequest(); diff --git a/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyResponse.java b/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyResponse.java index 8f414467972..688a475ea64 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyResponse.java +++ b/src/main/java/org/elasticsearch/action/termvectors/dfs/ShardDfsOnlyResponse.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.termvectors.dfs; -import org.elasticsearch.action.support.broadcast.BroadcastShardOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastShardResponse; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.index.shard.ShardId; @@ -30,7 +30,7 @@ import java.io.IOException; /** * */ -class ShardDfsOnlyResponse extends BroadcastShardOperationResponse { +class ShardDfsOnlyResponse extends BroadcastShardResponse { private DfsSearchResult dfsSearchResult = new DfsSearchResult(); diff --git a/src/main/java/org/elasticsearch/action/termvectors/dfs/TransportDfsOnlyAction.java b/src/main/java/org/elasticsearch/action/termvectors/dfs/TransportDfsOnlyAction.java index c1d698725e9..682ff47377c 100644 --- a/src/main/java/org/elasticsearch/action/termvectors/dfs/TransportDfsOnlyAction.java +++ b/src/main/java/org/elasticsearch/action/termvectors/dfs/TransportDfsOnlyAction.java @@ -24,7 +24,7 @@ import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.DefaultShardOperationFailedException; import org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException; -import org.elasticsearch.action.support.broadcast.TransportBroadcastOperationAction; +import org.elasticsearch.action.support.broadcast.TransportBroadcastAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -51,7 +51,7 @@ import static com.google.common.collect.Lists.newArrayList; /** * Get the dfs only with no fetch phase. This is for internal use only. */ -public class TransportDfsOnlyAction extends TransportBroadcastOperationAction { +public class TransportDfsOnlyAction extends TransportBroadcastAction { public static final String NAME = "internal:index/termvectors/dfs"; diff --git a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java index 5b66fafec12..3d5d938bde4 100644 --- a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java +++ b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java @@ -19,7 +19,7 @@ package org.elasticsearch.cluster.metadata; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.TimeoutClusterStateUpdateTask; @@ -223,7 +223,7 @@ public class MetaDataDeleteIndexService extends AbstractComponent { final String index; TimeValue timeout = TimeValue.timeValueSeconds(10); - TimeValue masterTimeout = MasterNodeOperationRequest.DEFAULT_MASTER_NODE_TIMEOUT; + TimeValue masterTimeout = MasterNodeRequest.DEFAULT_MASTER_NODE_TIMEOUT; public Request(String index) { this.index = index; diff --git a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexTemplateService.java b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexTemplateService.java index 3e945b161eb..840532e8637 100644 --- a/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexTemplateService.java +++ b/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexTemplateService.java @@ -23,7 +23,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.elasticsearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.support.master.MasterNodeOperationRequest; +import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.TimeoutClusterStateUpdateTask; @@ -231,7 +231,7 @@ public class MetaDataIndexTemplateService extends AbstractComponent { List aliases = Lists.newArrayList(); Map customs = Maps.newHashMap(); - TimeValue masterTimeout = MasterNodeOperationRequest.DEFAULT_MASTER_NODE_TIMEOUT; + TimeValue masterTimeout = MasterNodeRequest.DEFAULT_MASTER_NODE_TIMEOUT; public PutRequest(String cause, String name) { this.cause = cause; @@ -304,7 +304,7 @@ public class MetaDataIndexTemplateService extends AbstractComponent { public static class RemoveRequest { final String name; - TimeValue masterTimeout = MasterNodeOperationRequest.DEFAULT_MASTER_NODE_TIMEOUT; + TimeValue masterTimeout = MasterNodeRequest.DEFAULT_MASTER_NODE_TIMEOUT; public RemoveRequest(String name) { this.name = name; diff --git a/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java b/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java index 3b7c765d7d1..4573e2dac12 100644 --- a/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java +++ b/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java @@ -24,8 +24,8 @@ import org.elasticsearch.ElasticsearchTimeoutException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.FailedNodeException; -import org.elasticsearch.action.support.nodes.NodeOperationResponse; -import org.elasticsearch.action.support.nodes.NodesOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodeResponse; +import org.elasticsearch.action.support.nodes.BaseNodesResponse; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.node.DiscoveryNode; @@ -48,29 +48,29 @@ import java.util.*; * and once the results are back, it makes sure to schedule a reroute to make sure those results will * be taken into account. */ -public abstract class AsyncShardFetch implements Releasable { +public abstract class AsyncShardFetch implements Releasable { /** * An action that lists the relevant shard data that needs to be fetched. */ - public interface List, NodeResponse extends NodeOperationResponse> { + public interface List, NodeResponse extends BaseNodeResponse> { void list(ShardId shardId, IndexMetaData indexMetaData, String[] nodesIds, ActionListener listener); } protected final ESLogger logger; protected final String type; private final ShardId shardId; - private final List, T> action; + private final List, T> action; private final Map> cache = new HashMap<>(); private final Set nodesToIgnore = new HashSet<>(); private boolean closed; @SuppressWarnings("unchecked") - protected AsyncShardFetch(ESLogger logger, String type, ShardId shardId, List, T> action) { + protected AsyncShardFetch(ESLogger logger, String type, ShardId shardId, List, T> action) { this.logger = logger; this.type = type; this.shardId = shardId; - this.action = (List, T>) action; + this.action = (List, T>) action; } public synchronized void close() { @@ -253,9 +253,9 @@ public abstract class AsyncShardFetch implement // visible for testing void asyncFetch(final ShardId shardId, final String[] nodesIds, final MetaData metaData) { IndexMetaData indexMetaData = metaData.index(shardId.getIndex()); - action.list(shardId, indexMetaData, nodesIds, new ActionListener>() { + action.list(shardId, indexMetaData, nodesIds, new ActionListener>() { @Override - public void onResponse(NodesOperationResponse response) { + public void onResponse(BaseNodesResponse response) { processAsyncFetch(shardId, response.getNodes(), response.failures()); } @@ -274,7 +274,7 @@ public abstract class AsyncShardFetch implement * The result of a fetch operation. Make sure to first check {@link #hasData()} before * fetching the actual data. */ - public static class FetchResult { + public static class FetchResult { private final ShardId shardId; private final Map data; diff --git a/src/main/java/org/elasticsearch/gateway/GatewayAllocator.java b/src/main/java/org/elasticsearch/gateway/GatewayAllocator.java index a7647f73e50..f4385947dc8 100644 --- a/src/main/java/org/elasticsearch/gateway/GatewayAllocator.java +++ b/src/main/java/org/elasticsearch/gateway/GatewayAllocator.java @@ -25,8 +25,8 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import org.apache.lucene.util.CollectionUtil; -import org.elasticsearch.action.support.nodes.NodeOperationResponse; -import org.elasticsearch.action.support.nodes.NodesOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodeResponse; +import org.elasticsearch.action.support.nodes.BaseNodesResponse; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; @@ -513,12 +513,12 @@ public class GatewayAllocator extends AbstractComponent { return changed; } - static class InternalAsyncFetch extends AsyncShardFetch { + static class InternalAsyncFetch extends AsyncShardFetch { private final ClusterService clusterService; private final AllocationService allocationService; - public InternalAsyncFetch(ESLogger logger, String type, ShardId shardId, List, T> action, + public InternalAsyncFetch(ESLogger logger, String type, ShardId shardId, List, T> action, ClusterService clusterService, AllocationService allocationService) { super(logger, type, shardId, action); this.clusterService = clusterService; diff --git a/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayMetaState.java b/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayMetaState.java index 900a2e7ffc7..6fa20433283 100644 --- a/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayMetaState.java +++ b/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayMetaState.java @@ -45,7 +45,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public class TransportNodesListGatewayMetaState extends TransportNodesOperationAction { +public class TransportNodesListGatewayMetaState extends TransportNodesAction { public static final String ACTION_NAME = "internal:gateway/local/meta_state"; @@ -113,7 +113,7 @@ public class TransportNodesListGatewayMetaState extends TransportNodesOperationA return true; } - static class Request extends NodesOperationRequest { + static class Request extends BaseNodesRequest { public Request() { } @@ -133,7 +133,7 @@ public class TransportNodesListGatewayMetaState extends TransportNodesOperationA } } - public static class NodesGatewayMetaState extends NodesOperationResponse { + public static class NodesGatewayMetaState extends BaseNodesResponse { private FailedNodeException[] failures; @@ -170,7 +170,7 @@ public class TransportNodesListGatewayMetaState extends TransportNodesOperationA } - static class NodeRequest extends NodeOperationRequest { + static class NodeRequest extends BaseNodeRequest { NodeRequest() { } @@ -190,7 +190,7 @@ public class TransportNodesListGatewayMetaState extends TransportNodesOperationA } } - public static class NodeGatewayMetaState extends NodeOperationResponse { + public static class NodeGatewayMetaState extends BaseNodeResponse { private MetaData metaData; diff --git a/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayStartedShards.java b/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayStartedShards.java index 649e0a1c31a..d5692b3a5aa 100644 --- a/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayStartedShards.java +++ b/src/main/java/org/elasticsearch/gateway/TransportNodesListGatewayStartedShards.java @@ -50,7 +50,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; * We use this to find out which node holds the latest shard version and which of them used to be a primary in order to allocate * shards after node or cluster restarts. */ -public class TransportNodesListGatewayStartedShards extends TransportNodesOperationAction +public class TransportNodesListGatewayStartedShards extends TransportNodesAction implements AsyncShardFetch.List { public static final String ACTION_NAME = "internal:gateway/local/started_shards"; @@ -148,7 +148,7 @@ public class TransportNodesListGatewayStartedShards extends TransportNodesOperat return true; } - static class Request extends NodesOperationRequest { + static class Request extends BaseNodesRequest { private ShardId shardId; private String indexUUID; @@ -186,7 +186,7 @@ public class TransportNodesListGatewayStartedShards extends TransportNodesOperat } } - public static class NodesGatewayStartedShards extends NodesOperationResponse { + public static class NodesGatewayStartedShards extends BaseNodesResponse { private FailedNodeException[] failures; @@ -221,7 +221,7 @@ public class TransportNodesListGatewayStartedShards extends TransportNodesOperat } - static class NodeRequest extends NodeOperationRequest { + static class NodeRequest extends BaseNodeRequest { private ShardId shardId; private String indexUUID; @@ -258,7 +258,7 @@ public class TransportNodesListGatewayStartedShards extends TransportNodesOperat } } - public static class NodeGatewayStartedShards extends NodeOperationResponse { + public static class NodeGatewayStartedShards extends BaseNodeResponse { private long version = -1; diff --git a/src/main/java/org/elasticsearch/indices/store/TransportNodesListShardStoreMetaData.java b/src/main/java/org/elasticsearch/indices/store/TransportNodesListShardStoreMetaData.java index 04cfa6bda3d..3490f6d2d8c 100644 --- a/src/main/java/org/elasticsearch/indices/store/TransportNodesListShardStoreMetaData.java +++ b/src/main/java/org/elasticsearch/indices/store/TransportNodesListShardStoreMetaData.java @@ -58,7 +58,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public class TransportNodesListShardStoreMetaData extends TransportNodesOperationAction +public class TransportNodesListShardStoreMetaData extends TransportNodesAction implements AsyncShardFetch.List { public static final String ACTION_NAME = "internal:cluster/nodes/indices/shard/store"; @@ -241,7 +241,7 @@ public class TransportNodesListShardStoreMetaData extends TransportNodesOperatio } - static class Request extends NodesOperationRequest { + static class Request extends BaseNodesRequest { private ShardId shardId; @@ -277,7 +277,7 @@ public class TransportNodesListShardStoreMetaData extends TransportNodesOperatio } } - public static class NodesStoreFilesMetaData extends NodesOperationResponse { + public static class NodesStoreFilesMetaData extends BaseNodesResponse { private FailedNodeException[] failures; @@ -314,7 +314,7 @@ public class TransportNodesListShardStoreMetaData extends TransportNodesOperatio } - static class NodeRequest extends NodeOperationRequest { + static class NodeRequest extends BaseNodeRequest { private ShardId shardId; @@ -344,7 +344,7 @@ public class TransportNodesListShardStoreMetaData extends TransportNodesOperatio } } - public static class NodeStoreFilesMetaData extends NodeOperationResponse { + public static class NodeStoreFilesMetaData extends BaseNodeResponse { private StoreFilesMetaData storeFilesMetaData; diff --git a/src/main/java/org/elasticsearch/rest/action/support/RestActions.java b/src/main/java/org/elasticsearch/rest/action/support/RestActions.java index 67ceb83c33b..bd17c1d5944 100644 --- a/src/main/java/org/elasticsearch/rest/action/support/RestActions.java +++ b/src/main/java/org/elasticsearch/rest/action/support/RestActions.java @@ -22,7 +22,7 @@ package org.elasticsearch.rest.action.support; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.ShardOperationFailedException; import org.elasticsearch.action.support.QuerySourceBuilder; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.lucene.uid.Versions; @@ -62,7 +62,7 @@ public class RestActions { static final XContentBuilderString FAILURES = new XContentBuilderString("failures"); } - public static void buildBroadcastShardsHeader(XContentBuilder builder, ToXContent.Params params, BroadcastOperationResponse response) throws IOException { + public static void buildBroadcastShardsHeader(XContentBuilder builder, ToXContent.Params params, BroadcastResponse response) throws IOException { buildBroadcastShardsHeader(builder, params, response.getTotalShards(), response.getSuccessfulShards(), response.getFailedShards(), response.getShardFailures()); } diff --git a/src/main/java/org/elasticsearch/tribe/TribeService.java b/src/main/java/org/elasticsearch/tribe/TribeService.java index 540d3254e5c..546977c3aca 100644 --- a/src/main/java/org/elasticsearch/tribe/TribeService.java +++ b/src/main/java/org/elasticsearch/tribe/TribeService.java @@ -23,7 +23,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.action.support.master.TransportMasterNodeReadOperationAction; +import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.block.ClusterBlock; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -99,7 +99,7 @@ public class TribeService extends AbstractLifecycleComponent { if (sb.get("cluster.name") == null) { sb.put("cluster.name", "tribe_" + Strings.randomBase64UUID()); // make sure it won't join other tribe nodes in the same JVM } - sb.put(TransportMasterNodeReadOperationAction.FORCE_LOCAL_SETTING, true); + sb.put(TransportMasterNodeReadAction.FORCE_LOCAL_SETTING, true); return sb.build(); } diff --git a/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java b/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java index 2c27101c5d2..4b3ad487495 100644 --- a/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java +++ b/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java @@ -32,14 +32,9 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.index.query.QueryBuilders.andQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.notQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; +import static org.elasticsearch.index.query.QueryBuilders.*; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.Matchers.lessThan; /** @@ -90,7 +85,7 @@ public class HotThreadsTest extends ElasticsearchIntegrationTest { boolean success = false; try { assertThat(nodeHotThreads, notNullValue()); - Map nodesMap = nodeHotThreads.getNodesMap(); + Map nodesMap = nodeHotThreads.getNodesMap(); assertThat(nodesMap.size(), equalTo(cluster().size())); for (NodeHotThreads ht : nodeHotThreads) { assertNotNull(ht.getHotThreads()); diff --git a/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java b/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java index b8e97efe31d..ece5757355b 100644 --- a/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java +++ b/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java @@ -22,7 +22,7 @@ import com.google.common.base.Predicate; import com.google.common.collect.ImmutableSet; import org.elasticsearch.Version; import org.elasticsearch.action.FailedNodeException; -import org.elasticsearch.action.support.nodes.NodeOperationResponse; +import org.elasticsearch.action.support.nodes.BaseNodeResponse; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNodes; @@ -314,7 +314,7 @@ public class AsyncShardFetchTests extends ElasticsearchTestCase { } - static class Response extends NodeOperationResponse { + static class Response extends BaseNodeResponse { public Response(DiscoveryNode node) { super(node); diff --git a/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index 3cc47378116..819c1d5ab1d 100644 --- a/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -50,7 +50,7 @@ import org.elasticsearch.action.search.SearchPhaseExecutionException; import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.action.support.broadcast.BroadcastOperationResponse; +import org.elasticsearch.action.support.broadcast.BroadcastResponse; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.cluster.block.ClusterBlock; @@ -152,7 +152,7 @@ public class ElasticsearchAssertions { } } - public static String formatShardStatus(BroadcastOperationResponse response) { + public static String formatShardStatus(BroadcastResponse response) { String msg = " Total shards: " + response.getTotalShards() + " Successful shards: " + response.getSuccessfulShards() + " & " + response.getFailedShards() + " shard failures:"; for (ShardOperationFailedException failure : response.getShardFailures()) { @@ -321,12 +321,12 @@ public class ElasticsearchAssertions { assertVersionSerializable(percolateResponse); } - public static void assertNoFailures(BroadcastOperationResponse response) { + public static void assertNoFailures(BroadcastResponse response) { assertThat("Unexpected ShardFailures: " + Arrays.toString(response.getShardFailures()), response.getFailedShards(), equalTo(0)); assertVersionSerializable(response); } - public static void assertAllSuccessful(BroadcastOperationResponse response) { + public static void assertAllSuccessful(BroadcastResponse response) { assertNoFailures(response); assertThat("Expected all shards successful but got successful [" + response.getSuccessfulShards() + "] total [" + response.getTotalShards() + "]", response.getTotalShards(), equalTo(response.getSuccessfulShards()));