From 864c2ac96df63598ef32d60d217c7233c317f335 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sun, 15 Jan 2012 01:08:39 +0200 Subject: [PATCH] remove Action interface and rename BaseAction to TransportAction (all transport level actions should extend it) --- .../java/org/elasticsearch/action/Action.java | 32 ------------------- .../action/TransportActionModule.java | 12 +++---- .../action/bulk/TransportBulkAction.java | 4 +-- .../action/get/TransportMultiGetAction.java | 4 +-- .../mlt/TransportMoreLikeThisAction.java | 6 ++-- .../action/search/TransportSearchAction.java | 4 +-- .../search/TransportSearchScrollAction.java | 4 +-- .../type/TransportSearchTypeAction.java | 4 +-- .../{BaseAction.java => TransportAction.java} | 6 ++-- .../TransportBroadcastOperationAction.java | 4 +-- .../TransportMasterNodeOperationAction.java | 6 ++-- .../nodes/TransportNodesOperationAction.java | 4 +-- ...nsportIndexReplicationOperationAction.java | 4 +-- ...portIndicesReplicationOperationAction.java | 4 +-- ...nsportShardReplicationOperationAction.java | 4 +-- .../TransportSingleCustomOperationAction.java | 4 +-- ...ransportInstanceSingleOperationAction.java | 4 +-- .../TransportShardSingleOperationAction.java | 4 +-- .../elasticsearch/client/node/NodeClient.java | 4 +-- .../client/node/NodeClusterAdminClient.java | 4 +-- .../client/node/NodeIndicesAdminClient.java | 4 +-- 21 files changed, 44 insertions(+), 82 deletions(-) delete mode 100644 src/main/java/org/elasticsearch/action/Action.java rename src/main/java/org/elasticsearch/action/support/{BaseAction.java => TransportAction.java} (93%) diff --git a/src/main/java/org/elasticsearch/action/Action.java b/src/main/java/org/elasticsearch/action/Action.java deleted file mode 100644 index bc3ca22cfbb..00000000000 --- a/src/main/java/org/elasticsearch/action/Action.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to ElasticSearch and Shay Banon under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. ElasticSearch licenses this - * file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.elasticsearch.action; - -import org.elasticsearch.ElasticSearchException; - -/** - * - */ -public interface Action { - - ActionFuture execute(Request request) throws ElasticSearchException; - - void execute(Request request, ActionListener listener); -} diff --git a/src/main/java/org/elasticsearch/action/TransportActionModule.java b/src/main/java/org/elasticsearch/action/TransportActionModule.java index 5a6765df6bc..4f9d308930f 100644 --- a/src/main/java/org/elasticsearch/action/TransportActionModule.java +++ b/src/main/java/org/elasticsearch/action/TransportActionModule.java @@ -72,7 +72,7 @@ import org.elasticsearch.action.percolate.TransportPercolateAction; import org.elasticsearch.action.search.TransportSearchAction; import org.elasticsearch.action.search.TransportSearchScrollAction; import org.elasticsearch.action.search.type.*; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.action.update.TransportUpdateAction; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.inject.multibindings.MapBinder; @@ -88,10 +88,10 @@ public class TransportActionModule extends AbstractModule { static class ActionEntry { public final String name; - public final Class action; + public final Class action; public final Class[] supportActions; - ActionEntry(String name, Class action, Class... supportActions) { + ActionEntry(String name, Class action, Class... supportActions) { this.name = name; this.action = action; this.supportActions = supportActions; @@ -111,7 +111,7 @@ public class TransportActionModule extends AbstractModule { * @param action The action itself * @param supportActions Support actions. */ - public void registerAction(String actionName, Class action, Class... supportActions) { + public void registerAction(String actionName, Class action, Class... supportActions) { actions.put(actionName, new ActionEntry(actionName, action, supportActions)); } @@ -183,8 +183,8 @@ public class TransportActionModule extends AbstractModule { registerAction(TransportActions.MORE_LIKE_THIS, TransportMoreLikeThisAction.class); registerAction(TransportActions.PERCOLATE, TransportPercolateAction.class); - MapBinder actionsBinder - = MapBinder.newMapBinder(binder(), String.class, BaseAction.class); + MapBinder actionsBinder + = MapBinder.newMapBinder(binder(), String.class, TransportAction.class); for (Map.Entry entry : actions.entrySet()) { actionsBinder.addBinding(entry.getKey()).to(entry.getValue().action).asEagerSingleton(); diff --git a/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java b/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java index 35dc277200d..0331b98fa2a 100644 --- a/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java +++ b/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java @@ -31,7 +31,7 @@ import org.elasticsearch.action.admin.indices.create.CreateIndexResponse; import org.elasticsearch.action.admin.indices.create.TransportCreateIndexAction; import org.elasticsearch.action.delete.DeleteRequest; import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -57,7 +57,7 @@ import java.util.concurrent.atomic.AtomicInteger; /** * */ -public class TransportBulkAction extends BaseAction { +public class TransportBulkAction extends TransportAction { private final boolean autoCreateIndex; diff --git a/src/main/java/org/elasticsearch/action/get/TransportMultiGetAction.java b/src/main/java/org/elasticsearch/action/get/TransportMultiGetAction.java index 3819bdb69a5..bf0a40ec070 100644 --- a/src/main/java/org/elasticsearch/action/get/TransportMultiGetAction.java +++ b/src/main/java/org/elasticsearch/action/get/TransportMultiGetAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.get; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.TransportActions; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -38,7 +38,7 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -public class TransportMultiGetAction extends BaseAction { +public class TransportMultiGetAction extends TransportAction { private final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java b/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java index de775d2cc2b..68d51e964b9 100644 --- a/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java +++ b/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java @@ -30,7 +30,7 @@ import org.elasticsearch.action.get.TransportGetAction; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.TransportSearchAction; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.common.inject.Inject; @@ -58,10 +58,8 @@ import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; /** * The more like this action. - * - * */ -public class TransportMoreLikeThisAction extends BaseAction { +public class TransportMoreLikeThisAction extends TransportAction { private final TransportSearchAction searchAction; diff --git a/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java b/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java index 09c5ad45fda..f384c49e790 100644 --- a/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java +++ b/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.search; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.TransportActions; import org.elasticsearch.action.search.type.*; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.common.inject.Inject; @@ -41,7 +41,7 @@ import static org.elasticsearch.action.search.SearchType.*; /** * */ -public class TransportSearchAction extends BaseAction { +public class TransportSearchAction extends TransportAction { private final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/search/TransportSearchScrollAction.java b/src/main/java/org/elasticsearch/action/search/TransportSearchScrollAction.java index 71f98419fde..dcc208bba01 100644 --- a/src/main/java/org/elasticsearch/action/search/TransportSearchScrollAction.java +++ b/src/main/java/org/elasticsearch/action/search/TransportSearchScrollAction.java @@ -26,7 +26,7 @@ import org.elasticsearch.action.search.type.ParsedScrollId; import org.elasticsearch.action.search.type.TransportSearchScrollQueryAndFetchAction; import org.elasticsearch.action.search.type.TransportSearchScrollQueryThenFetchAction; import org.elasticsearch.action.search.type.TransportSearchScrollScanAction; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; @@ -40,7 +40,7 @@ import static org.elasticsearch.action.search.type.TransportSearchHelper.parseSc /** * */ -public class TransportSearchScrollAction extends BaseAction { +public class TransportSearchScrollAction extends TransportAction { private final TransportSearchScrollQueryThenFetchAction queryThenFetchAction; diff --git a/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java b/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java index fd610cf1edf..7ab9f545640 100644 --- a/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java +++ b/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.search.type; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.search.*; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -54,7 +54,7 @@ import static org.elasticsearch.action.search.type.TransportSearchHelper.interna /** * */ -public abstract class TransportSearchTypeAction extends BaseAction { +public abstract class TransportSearchTypeAction extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/BaseAction.java b/src/main/java/org/elasticsearch/action/support/TransportAction.java similarity index 93% rename from src/main/java/org/elasticsearch/action/support/BaseAction.java rename to src/main/java/org/elasticsearch/action/support/TransportAction.java index 1247d924006..8d604dd5a9c 100644 --- a/src/main/java/org/elasticsearch/action/support/BaseAction.java +++ b/src/main/java/org/elasticsearch/action/support/TransportAction.java @@ -30,16 +30,15 @@ import static org.elasticsearch.action.support.PlainActionFuture.newFuture; /** * */ -public abstract class BaseAction extends AbstractComponent implements Action { +public abstract class TransportAction extends AbstractComponent { protected final ThreadPool threadPool; - protected BaseAction(Settings settings, ThreadPool threadPool) { + protected TransportAction(Settings settings, ThreadPool threadPool) { super(settings); this.threadPool = threadPool; } - @Override public ActionFuture execute(Request request) throws ElasticSearchException { PlainActionFuture future = newFuture(); // since we don't have a listener, and we release a possible lock with the future @@ -49,7 +48,6 @@ public abstract class BaseAction listener) { if (request.listenerThreaded()) { listener = new ThreadedActionListener(threadPool, listener); diff --git a/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java b/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java index 32e45a13816..ed3e8d547a9 100644 --- a/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/broadcast/TransportBroadcastOperationAction.java @@ -21,7 +21,7 @@ package org.elasticsearch.action.support.broadcast; import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -42,7 +42,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; * */ public abstract class TransportBroadcastOperationAction - extends BaseAction { + extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java b/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java index 8e5eee0ab65..a058787c256 100644 --- a/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeOperationAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.support.master; import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterChangedEvent; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -38,10 +38,8 @@ import org.elasticsearch.transport.*; /** * A base class for operations that needs to be performed on the master node. - * - * */ -public abstract class TransportMasterNodeOperationAction extends BaseAction { +public abstract class TransportMasterNodeOperationAction extends TransportAction { protected final TransportService transportService; diff --git a/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java b/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java index ce4e48586a0..7a4f4fbf9f9 100644 --- a/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesOperationAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.FailedNodeException; import org.elasticsearch.action.NoSuchNodeException; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; /** * */ -public abstract class TransportNodesOperationAction extends BaseAction { +public abstract class TransportNodesOperationAction extends TransportAction { protected final ClusterName clusterName; diff --git a/src/main/java/org/elasticsearch/action/support/replication/TransportIndexReplicationOperationAction.java b/src/main/java/org/elasticsearch/action/support/replication/TransportIndexReplicationOperationAction.java index 43a1536d398..e26eecb4a44 100644 --- a/src/main/java/org/elasticsearch/action/support/replication/TransportIndexReplicationOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/replication/TransportIndexReplicationOperationAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; * */ public abstract class TransportIndexReplicationOperationAction - extends BaseAction { + extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/replication/TransportIndicesReplicationOperationAction.java b/src/main/java/org/elasticsearch/action/support/replication/TransportIndicesReplicationOperationAction.java index 251d8ce9073..4ffcf480c35 100644 --- a/src/main/java/org/elasticsearch/action/support/replication/TransportIndicesReplicationOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/replication/TransportIndicesReplicationOperationAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.support.replication; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -42,7 +42,7 @@ import java.util.concurrent.atomic.AtomicReferenceArray; */ public abstract class TransportIndicesReplicationOperationAction - extends BaseAction { + extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java b/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java index 95e3b02f969..14fb006d550 100644 --- a/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java @@ -22,7 +22,7 @@ package org.elasticsearch.action.support.replication; import org.elasticsearch.ElasticSearchException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.*; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterChangedEvent; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -59,7 +59,7 @@ import static org.elasticsearch.ExceptionsHelper.detailedMessage; /** */ -public abstract class TransportShardReplicationOperationAction extends BaseAction { +public abstract class TransportShardReplicationOperationAction extends TransportAction { protected final TransportService transportService; diff --git a/src/main/java/org/elasticsearch/action/support/single/custom/TransportSingleCustomOperationAction.java b/src/main/java/org/elasticsearch/action/support/single/custom/TransportSingleCustomOperationAction.java index 97957ea3432..edb47af79b8 100644 --- a/src/main/java/org/elasticsearch/action/support/single/custom/TransportSingleCustomOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/single/custom/TransportSingleCustomOperationAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.NoShardAvailableActionException; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -43,7 +43,7 @@ import java.io.IOException; /** * */ -public abstract class TransportSingleCustomOperationAction extends BaseAction { +public abstract class TransportSingleCustomOperationAction extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationAction.java b/src/main/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationAction.java index 1ead9d802d5..b257fc9970c 100644 --- a/src/main/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.UnavailableShardsException; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterChangedEvent; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; @@ -46,7 +46,7 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * */ -public abstract class TransportInstanceSingleOperationAction extends BaseAction { +public abstract class TransportInstanceSingleOperationAction extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/action/support/single/shard/TransportShardSingleOperationAction.java b/src/main/java/org/elasticsearch/action/support/single/shard/TransportShardSingleOperationAction.java index 8e54c55ce95..b10fcd1c4aa 100644 --- a/src/main/java/org/elasticsearch/action/support/single/shard/TransportShardSingleOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/single/shard/TransportShardSingleOperationAction.java @@ -23,7 +23,7 @@ import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.NoShardAvailableActionException; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -44,7 +44,7 @@ import java.io.IOException; /** * */ -public abstract class TransportShardSingleOperationAction extends BaseAction { +public abstract class TransportShardSingleOperationAction extends TransportAction { protected final ClusterService clusterService; diff --git a/src/main/java/org/elasticsearch/client/node/NodeClient.java b/src/main/java/org/elasticsearch/client/node/NodeClient.java index aa733170ff6..2de1400df69 100644 --- a/src/main/java/org/elasticsearch/client/node/NodeClient.java +++ b/src/main/java/org/elasticsearch/client/node/NodeClient.java @@ -44,7 +44,7 @@ import org.elasticsearch.action.percolate.PercolateRequest; import org.elasticsearch.action.percolate.PercolateResponse; import org.elasticsearch.action.percolate.TransportPercolateAction; import org.elasticsearch.action.search.*; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.action.update.TransportUpdateAction; import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.action.update.UpdateResponse; @@ -91,7 +91,7 @@ public class NodeClient extends AbstractClient implements InternalClient { private final TransportPercolateAction percolateAction; @Inject - public NodeClient(Settings settings, ThreadPool threadPool, NodeAdminClient admin, Map actions) { + public NodeClient(Settings settings, ThreadPool threadPool, NodeAdminClient admin, Map actions) { this.threadPool = threadPool; this.admin = admin; this.indexAction = (TransportIndexAction) actions.get(TransportActions.INDEX); diff --git a/src/main/java/org/elasticsearch/client/node/NodeClusterAdminClient.java b/src/main/java/org/elasticsearch/client/node/NodeClusterAdminClient.java index d97b4b77c67..d0f81e75340 100644 --- a/src/main/java/org/elasticsearch/client/node/NodeClusterAdminClient.java +++ b/src/main/java/org/elasticsearch/client/node/NodeClusterAdminClient.java @@ -55,7 +55,7 @@ import org.elasticsearch.action.admin.cluster.settings.TransportClusterUpdateSet import org.elasticsearch.action.admin.cluster.state.ClusterStateRequest; import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse; import org.elasticsearch.action.admin.cluster.state.TransportClusterStateAction; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.client.internal.InternalClusterAdminClient; import org.elasticsearch.client.support.AbstractClusterAdminClient; import org.elasticsearch.common.inject.Inject; @@ -94,7 +94,7 @@ public class NodeClusterAdminClient extends AbstractClusterAdminClient implement private final TransportNodesRestartAction nodesRestart; @Inject - public NodeClusterAdminClient(Settings settings, ThreadPool threadPool, Map actions) { + public NodeClusterAdminClient(Settings settings, ThreadPool threadPool, Map actions) { this.threadPool = threadPool; this.clusterRerouteAction = (TransportClusterRerouteAction) actions.get(TransportActions.Admin.Cluster.REROUTE); this.clusterHealthAction = (TransportClusterHealthAction) actions.get(TransportActions.Admin.Cluster.HEALTH); diff --git a/src/main/java/org/elasticsearch/client/node/NodeIndicesAdminClient.java b/src/main/java/org/elasticsearch/client/node/NodeIndicesAdminClient.java index d318351c825..c69ea9b9f48 100644 --- a/src/main/java/org/elasticsearch/client/node/NodeIndicesAdminClient.java +++ b/src/main/java/org/elasticsearch/client/node/NodeIndicesAdminClient.java @@ -85,7 +85,7 @@ import org.elasticsearch.action.admin.indices.template.put.TransportPutIndexTemp import org.elasticsearch.action.admin.indices.validate.query.TransportValidateQueryAction; import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest; import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryResponse; -import org.elasticsearch.action.support.BaseAction; +import org.elasticsearch.action.support.TransportAction; import org.elasticsearch.client.IndicesAdminClient; import org.elasticsearch.client.support.AbstractIndicesAdminClient; import org.elasticsearch.common.inject.Inject; @@ -144,7 +144,7 @@ public class NodeIndicesAdminClient extends AbstractIndicesAdminClient implement private final TransportValidateQueryAction validateQueryAction; @Inject - public NodeIndicesAdminClient(Settings settings, ThreadPool threadPool, Map actions) { + public NodeIndicesAdminClient(Settings settings, ThreadPool threadPool, Map actions) { this.threadPool = threadPool; this.indicesExistsAction = (TransportIndicesExistsAction) actions.get(TransportActions.Admin.Indices.EXISTS); this.indicesStatsAction = (TransportIndicesStatsAction) actions.get(TransportActions.Admin.Indices.STATS);