mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
cleanup single operation action support
This commit is contained in:
parent
5833a6b9ff
commit
58ecc4f77f
@ -19,7 +19,7 @@
|
||||
|
||||
package org.elasticsearch.action.admin.cluster.ping.single;
|
||||
|
||||
import org.elasticsearch.action.support.single.SingleOperationRequest;
|
||||
import org.elasticsearch.action.support.single.shard.SingleOperationRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
|
@ -21,21 +21,20 @@ package org.elasticsearch.action.admin.cluster.ping.single;
|
||||
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.action.TransportActions;
|
||||
import org.elasticsearch.action.support.single.TransportSingleOperationAction;
|
||||
import org.elasticsearch.action.support.single.shard.TransportSingleOperationAction;
|
||||
import org.elasticsearch.cluster.ClusterService;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
/**
|
||||
* @author kimchy (Shay Banon)
|
||||
* @author kimchy (shay.banon)
|
||||
*/
|
||||
public class TransportSinglePingAction extends TransportSingleOperationAction<SinglePingRequest, SinglePingResponse> {
|
||||
|
||||
@Inject public TransportSinglePingAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, IndicesService indicesService) {
|
||||
super(settings, threadPool, clusterService, transportService, indicesService);
|
||||
@Inject public TransportSinglePingAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService) {
|
||||
super(settings, threadPool, clusterService, transportService);
|
||||
}
|
||||
|
||||
@Override protected String transportAction() {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package org.elasticsearch.action.get;
|
||||
|
||||
import org.elasticsearch.action.support.single.SingleOperationRequest;
|
||||
import org.elasticsearch.action.support.single.shard.SingleOperationRequest;
|
||||
import org.elasticsearch.common.Required;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -24,7 +24,7 @@ import org.apache.lucene.document.FieldSelector;
|
||||
import org.apache.lucene.document.Fieldable;
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.action.TransportActions;
|
||||
import org.elasticsearch.action.support.single.TransportSingleOperationAction;
|
||||
import org.elasticsearch.action.support.single.shard.TransportSingleOperationAction;
|
||||
import org.elasticsearch.cluster.ClusterService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
@ -52,9 +52,12 @@ import static org.elasticsearch.common.collect.Maps.*;
|
||||
*/
|
||||
public class TransportGetAction extends TransportSingleOperationAction<GetRequest, GetResponse> {
|
||||
|
||||
private final IndicesService indicesService;
|
||||
|
||||
@Inject public TransportGetAction(Settings settings, ClusterService clusterService, TransportService transportService,
|
||||
IndicesService indicesService, ThreadPool threadPool) {
|
||||
super(settings, threadPool, clusterService, transportService, indicesService);
|
||||
super(settings, threadPool, clusterService, transportService);
|
||||
this.indicesService = indicesService;
|
||||
}
|
||||
|
||||
@Override protected String transportAction() {
|
||||
|
@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support.single;
|
||||
package org.elasticsearch.action.support.single.shard;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support.single;
|
||||
package org.elasticsearch.action.support.single.shard;
|
||||
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
@ -34,7 +34,6 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.*;
|
||||
|
||||
@ -49,16 +48,13 @@ public abstract class TransportSingleOperationAction<Request extends SingleOpera
|
||||
|
||||
protected final TransportService transportService;
|
||||
|
||||
protected final IndicesService indicesService;
|
||||
|
||||
protected final ThreadPool threadPool;
|
||||
|
||||
protected TransportSingleOperationAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, IndicesService indicesService) {
|
||||
protected TransportSingleOperationAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService) {
|
||||
super(settings);
|
||||
this.clusterService = clusterService;
|
||||
this.transportService = transportService;
|
||||
this.threadPool = threadPool;
|
||||
this.indicesService = indicesService;
|
||||
|
||||
transportService.registerHandler(transportAction(), new TransportHandler());
|
||||
transportService.registerHandler(transportShardAction(), new ShardTransportHandler());
|
Loading…
x
Reference in New Issue
Block a user