Reorder HandledTransportAction ctor args (#44291)
This commit moves the Supplier variant of HandledTransportAction to have a different ordering than the Writeable.Reader variant. The Supplier version is used for the legacy Streamable, and currently having the location of the Writeable.Reader vs Supplier in the same place forces using casts of Writeable.Reader to select the correct super constructor. This change in ordering allows easier migration to Writeable.Reader. relates #34389
This commit is contained in:
parent
51ff6b420a
commit
1dcf53465c
|
@ -32,15 +32,13 @@ import org.elasticsearch.index.shard.ShardId;
|
|||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportNoopBulkAction extends HandledTransportAction<BulkRequest, BulkResponse> {
|
||||
private static final BulkItemResponse ITEM_RESPONSE = new BulkItemResponse(1, DocWriteRequest.OpType.UPDATE,
|
||||
new UpdateResponse(new ShardId("mock", "", 1), "mock_type", "1", 1L, DocWriteResponse.Result.CREATED));
|
||||
|
||||
@Inject
|
||||
public TransportNoopBulkAction(TransportService transportService, ActionFilters actionFilters) {
|
||||
super(NoopBulkAction.NAME, transportService, actionFilters, (Supplier<BulkRequest>) BulkRequest::new);
|
||||
super(NoopBulkAction.NAME, transportService, BulkRequest::new, actionFilters);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -102,7 +102,7 @@ public class GrokProcessorGetAction extends StreamableResponseActionType<GrokPro
|
|||
|
||||
@Inject
|
||||
public TransportAction(TransportService transportService, ActionFilters actionFilters) {
|
||||
super(NAME, transportService, actionFilters, Request::new);
|
||||
super(NAME, transportService, Request::new, actionFilters);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TransportMultiSearchTemplateAction extends HandledTransportAction<M
|
|||
@Inject
|
||||
public TransportMultiSearchTemplateAction(TransportService transportService, ActionFilters actionFilters, ScriptService scriptService,
|
||||
NamedXContentRegistry xContentRegistry, NodeClient client) {
|
||||
super(MultiSearchTemplateAction.NAME, transportService, actionFilters, MultiSearchTemplateRequest::new);
|
||||
super(MultiSearchTemplateAction.NAME, transportService, MultiSearchTemplateRequest::new, actionFilters);
|
||||
this.scriptService = scriptService;
|
||||
this.xContentRegistry = xContentRegistry;
|
||||
this.client = client;
|
||||
|
|
|
@ -42,7 +42,6 @@ import org.elasticsearch.transport.TransportService;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportSearchTemplateAction extends HandledTransportAction<SearchTemplateRequest, SearchTemplateResponse> {
|
||||
|
||||
|
@ -55,7 +54,7 @@ public class TransportSearchTemplateAction extends HandledTransportAction<Search
|
|||
@Inject
|
||||
public TransportSearchTemplateAction(TransportService transportService, ActionFilters actionFilters,
|
||||
ScriptService scriptService, NamedXContentRegistry xContentRegistry, NodeClient client) {
|
||||
super(SearchTemplateAction.NAME, transportService, actionFilters, (Supplier<SearchTemplateRequest>) SearchTemplateRequest::new);
|
||||
super(SearchTemplateAction.NAME, transportService, SearchTemplateRequest::new, actionFilters);
|
||||
this.scriptService = scriptService;
|
||||
this.xContentRegistry = xContentRegistry;
|
||||
this.client = client;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class TransportGetTaskAction extends HandledTransportAction<GetTaskReques
|
|||
@Inject
|
||||
public TransportGetTaskAction(ThreadPool threadPool, TransportService transportService, ActionFilters actionFilters,
|
||||
ClusterService clusterService, Client client, NamedXContentRegistry xContentRegistry) {
|
||||
super(GetTaskAction.NAME, transportService, actionFilters, GetTaskRequest::new);
|
||||
super(GetTaskAction.NAME, transportService, GetTaskRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = clusterService;
|
||||
this.transportService = transportService;
|
||||
|
|
|
@ -28,8 +28,6 @@ import org.elasticsearch.tasks.Task;
|
|||
import org.elasticsearch.transport.RemoteClusterService;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
public final class TransportRemoteInfoAction extends HandledTransportAction<RemoteInfoRequest, RemoteInfoResponse> {
|
||||
|
@ -39,8 +37,7 @@ public final class TransportRemoteInfoAction extends HandledTransportAction<Remo
|
|||
@Inject
|
||||
public TransportRemoteInfoAction(TransportService transportService, ActionFilters actionFilters,
|
||||
SearchTransportService searchTransportService) {
|
||||
super(RemoteInfoAction.NAME, transportService, actionFilters,
|
||||
(Supplier<RemoteInfoRequest>) RemoteInfoRequest::new);
|
||||
super(RemoteInfoAction.NAME, transportService, RemoteInfoRequest::new, actionFilters);
|
||||
this.remoteClusterService = searchTransportService.getRemoteClusterService();
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ import org.elasticsearch.indices.flush.SyncedFlushService;
|
|||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Synced flush ActionType.
|
||||
*/
|
||||
|
@ -39,8 +37,7 @@ public class TransportSyncedFlushAction extends HandledTransportAction<SyncedFlu
|
|||
@Inject
|
||||
public TransportSyncedFlushAction(TransportService transportService, ActionFilters actionFilters,
|
||||
SyncedFlushService syncedFlushService) {
|
||||
super(SyncedFlushAction.NAME, transportService, actionFilters,
|
||||
(Supplier<SyncedFlushRequest>) SyncedFlushRequest::new);
|
||||
super(SyncedFlushAction.NAME, transportService, SyncedFlushRequest::new, actionFilters);
|
||||
this.syncedFlushService = syncedFlushService;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TransportGetFieldMappingsAction extends HandledTransportAction<GetF
|
|||
public TransportGetFieldMappingsAction(TransportService transportService, ClusterService clusterService,
|
||||
TransportGetFieldMappingsIndexAction shardAction,
|
||||
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(GetFieldMappingsAction.NAME, transportService, actionFilters, GetFieldMappingsRequest::new);
|
||||
super(GetFieldMappingsAction.NAME, transportService, GetFieldMappingsRequest::new, actionFilters);
|
||||
this.clusterService = clusterService;
|
||||
this.shardAction = shardAction;
|
||||
this.indexNameExpressionResolver = indexNameExpressionResolver;
|
||||
|
|
|
@ -81,7 +81,6 @@ import java.util.Set;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.LongSupplier;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.Collections.emptyMap;
|
||||
|
@ -117,7 +116,7 @@ public class TransportBulkAction extends HandledTransportAction<BulkRequest, Bul
|
|||
TransportShardBulkAction shardBulkAction, NodeClient client,
|
||||
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
|
||||
AutoCreateIndex autoCreateIndex, LongSupplier relativeTimeProvider) {
|
||||
super(BulkAction.NAME, transportService, actionFilters, (Supplier<BulkRequest>) BulkRequest::new, ThreadPool.Names.WRITE);
|
||||
super(BulkAction.NAME, transportService, BulkRequest::new, actionFilters, ThreadPool.Names.WRITE);
|
||||
Objects.requireNonNull(relativeTimeProvider);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = clusterService;
|
||||
|
|
|
@ -57,7 +57,7 @@ public class TransportFieldCapabilitiesAction extends HandledTransportAction<Fie
|
|||
ClusterService clusterService, ThreadPool threadPool,
|
||||
TransportFieldCapabilitiesIndexAction shardAction,
|
||||
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(FieldCapabilitiesAction.NAME, transportService, actionFilters, FieldCapabilitiesRequest::new);
|
||||
super(FieldCapabilitiesAction.NAME, transportService, FieldCapabilitiesRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = clusterService;
|
||||
this.remoteClusterService = transportService.getRemoteClusterService();
|
||||
|
|
|
@ -47,7 +47,7 @@ public class TransportMultiGetAction extends HandledTransportAction<MultiGetRequ
|
|||
public TransportMultiGetAction(TransportService transportService, ClusterService clusterService,
|
||||
TransportShardMultiGetAction shardAction, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver resolver) {
|
||||
super(MultiGetAction.NAME, transportService, actionFilters, MultiGetRequest::new);
|
||||
super(MultiGetAction.NAME, transportService, MultiGetRequest::new, actionFilters);
|
||||
this.clusterService = clusterService;
|
||||
this.shardAction = shardAction;
|
||||
this.indexNameExpressionResolver = resolver;
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TransportMainAction extends HandledTransportAction<MainRequest, Mai
|
|||
@Inject
|
||||
public TransportMainAction(Settings settings, TransportService transportService,
|
||||
ActionFilters actionFilters, ClusterService clusterService) {
|
||||
super(MainAction.NAME, transportService, actionFilters, MainRequest::new);
|
||||
super(MainAction.NAME, transportService, MainRequest::new, actionFilters);
|
||||
this.nodeName = Node.NODE_NAME_SETTING.get(settings);
|
||||
this.clusterService = clusterService;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class TransportClearScrollAction extends HandledTransportAction<ClearScro
|
|||
@Inject
|
||||
public TransportClearScrollAction(TransportService transportService, ClusterService clusterService, ActionFilters actionFilters,
|
||||
SearchTransportService searchTransportService) {
|
||||
super(ClearScrollAction.NAME, transportService, actionFilters, ClearScrollRequest::new);
|
||||
super(ClearScrollAction.NAME, transportService, ClearScrollRequest::new, actionFilters);
|
||||
this.clusterService = clusterService;
|
||||
this.searchTransportService = searchTransportService;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ import java.util.function.Supplier;
|
|||
public abstract class HandledTransportAction<Request extends ActionRequest, Response extends ActionResponse>
|
||||
extends TransportAction<Request, Response> {
|
||||
protected HandledTransportAction(String actionName, TransportService transportService,
|
||||
ActionFilters actionFilters, Supplier<Request> request) {
|
||||
this(actionName, true, transportService, actionFilters, request);
|
||||
Supplier<Request> request, ActionFilters actionFilters) {
|
||||
this(actionName, true, transportService, request, actionFilters);
|
||||
}
|
||||
|
||||
protected HandledTransportAction(String actionName, TransportService transportService,
|
||||
|
@ -50,14 +50,14 @@ public abstract class HandledTransportAction<Request extends ActionRequest, Resp
|
|||
}
|
||||
|
||||
protected HandledTransportAction(String actionName, boolean canTripCircuitBreaker,
|
||||
TransportService transportService, ActionFilters actionFilters, Supplier<Request> request) {
|
||||
TransportService transportService, Supplier<Request> request, ActionFilters actionFilters) {
|
||||
super(actionName, actionFilters, transportService.getTaskManager());
|
||||
transportService.registerRequestHandler(actionName, request, ThreadPool.Names.SAME, false, canTripCircuitBreaker,
|
||||
new TransportHandler());
|
||||
}
|
||||
|
||||
protected HandledTransportAction(String actionName, TransportService transportService, ActionFilters actionFilters,
|
||||
Supplier<Request> request, String executor) {
|
||||
protected HandledTransportAction(String actionName, TransportService transportService, Supplier<Request> request,
|
||||
ActionFilters actionFilters, String executor) {
|
||||
super(actionName, actionFilters, transportService.getTaskManager());
|
||||
transportService.registerRequestHandler(actionName, request, executor, false, true,
|
||||
new TransportHandler());
|
||||
|
|
|
@ -68,7 +68,7 @@ public abstract class TransportBroadcastAction<
|
|||
TransportService transportService, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request,
|
||||
Supplier<ShardRequest> shardRequest, String shardExecutor) {
|
||||
super(actionName, transportService, actionFilters, request);
|
||||
super(actionName, transportService, request, actionFilters);
|
||||
this.clusterService = clusterService;
|
||||
this.transportService = transportService;
|
||||
this.indexNameExpressionResolver = indexNameExpressionResolver;
|
||||
|
|
|
@ -104,7 +104,7 @@ public abstract class TransportBroadcastByNodeAction<Request extends BroadcastRe
|
|||
Supplier<Request> request,
|
||||
String executor,
|
||||
boolean canTripCircuitBreaker) {
|
||||
super(actionName, canTripCircuitBreaker, transportService, actionFilters, request);
|
||||
super(actionName, canTripCircuitBreaker, transportService, request, actionFilters);
|
||||
|
||||
this.clusterService = clusterService;
|
||||
this.transportService = transportService;
|
||||
|
|
|
@ -81,7 +81,7 @@ public abstract class TransportMasterNodeAction<Request extends MasterNodeReques
|
|||
TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
|
||||
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
|
||||
Supplier<Request> request) {
|
||||
super(actionName, canTripCircuitBreaker, transportService, actionFilters, request);
|
||||
super(actionName, canTripCircuitBreaker, transportService, request, actionFilters);
|
||||
this.transportService = transportService;
|
||||
this.clusterService = clusterService;
|
||||
this.threadPool = threadPool;
|
||||
|
|
|
@ -65,7 +65,7 @@ public abstract class TransportNodesAction<NodesRequest extends BaseNodesRequest
|
|||
ClusterService clusterService, TransportService transportService, ActionFilters actionFilters,
|
||||
Supplier<NodesRequest> request, Supplier<NodeRequest> nodeRequest, String nodeExecutor,
|
||||
Class<NodeResponse> nodeResponseClass) {
|
||||
super(actionName, transportService, actionFilters, request);
|
||||
super(actionName, transportService, request, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = Objects.requireNonNull(clusterService);
|
||||
this.transportService = Objects.requireNonNull(transportService);
|
||||
|
|
|
@ -67,7 +67,7 @@ public abstract class TransportInstanceSingleOperationAction<
|
|||
ClusterService clusterService, TransportService transportService,
|
||||
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
|
||||
Supplier<Request> request) {
|
||||
super(actionName, transportService, actionFilters, request);
|
||||
super(actionName, transportService, request, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = clusterService;
|
||||
this.transportService = transportService;
|
||||
|
|
|
@ -48,7 +48,7 @@ public class TransportMultiTermVectorsAction extends HandledTransportAction<Mult
|
|||
public TransportMultiTermVectorsAction(TransportService transportService, ClusterService clusterService,
|
||||
TransportShardMultiTermsVectorAction shardAction, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(MultiTermVectorsAction.NAME, transportService, actionFilters, MultiTermVectorsRequest::new);
|
||||
super(MultiTermVectorsAction.NAME, transportService, MultiTermVectorsRequest::new, actionFilters);
|
||||
this.clusterService = clusterService;
|
||||
this.shardAction = shardAction;
|
||||
this.indexNameExpressionResolver = indexNameExpressionResolver;
|
||||
|
|
|
@ -63,7 +63,7 @@ public abstract class AbstractTransportGetResourcesAction<Resource extends ToXCo
|
|||
|
||||
protected AbstractTransportGetResourcesAction(String actionName, TransportService transportService, ActionFilters actionFilters,
|
||||
Supplier<Request> request, Client client, NamedXContentRegistry xContentRegistry) {
|
||||
super(actionName, transportService, actionFilters, request);
|
||||
super(actionName, transportService, request, actionFilters);
|
||||
this.client = Objects.requireNonNull(client);
|
||||
this.xContentRegistry = Objects.requireNonNull(xContentRegistry);
|
||||
}
|
||||
|
|
|
@ -31,8 +31,7 @@ public class TransportXPackInfoAction extends HandledTransportAction<XPackInfoRe
|
|||
@Inject
|
||||
public TransportXPackInfoAction(TransportService transportService, ActionFilters actionFilters, LicenseService licenseService,
|
||||
Set<XPackFeatureSet> featureSets) {
|
||||
super(XPackInfoAction.NAME, transportService, actionFilters,
|
||||
XPackInfoRequest::new);
|
||||
super(XPackInfoAction.NAME, transportService, XPackInfoRequest::new, actionFilters);
|
||||
this.licenseService = licenseService;
|
||||
this.featureSets = featureSets;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ public class TransportGetCertificateInfoAction extends HandledTransportAction<Ge
|
|||
|
||||
@Inject
|
||||
public TransportGetCertificateInfoAction(TransportService transportService, ActionFilters actionFilters, SSLService sslService) {
|
||||
super(GetCertificateInfoAction.NAME, transportService, actionFilters,
|
||||
GetCertificateInfoAction.Request::new);
|
||||
super(GetCertificateInfoAction.NAME, transportService, GetCertificateInfoAction.Request::new, actionFilters
|
||||
);
|
||||
this.sslService = sslService;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Performs a series of elasticsearch queries and aggregations to explore
|
||||
|
@ -85,7 +84,7 @@ public class TransportGraphExploreAction extends HandledTransportAction<GraphExp
|
|||
@Inject
|
||||
public TransportGraphExploreAction(ThreadPool threadPool, NodeClient client, TransportService transportService,
|
||||
ActionFilters actionFilters, XPackLicenseState licenseState) {
|
||||
super(GraphExploreAction.NAME, transportService, actionFilters, (Supplier<GraphExploreRequest>)GraphExploreRequest::new);
|
||||
super(GraphExploreAction.NAME, transportService, GraphExploreRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.client = client;
|
||||
this.licenseState = licenseState;
|
||||
|
|
|
@ -25,8 +25,6 @@ import org.elasticsearch.xpack.core.ml.calendars.Calendar;
|
|||
import org.elasticsearch.xpack.ml.job.JobManager;
|
||||
import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
||||
|
@ -40,8 +38,8 @@ public class TransportDeleteCalendarAction extends HandledTransportAction<Delete
|
|||
public TransportDeleteCalendarAction(TransportService transportService,
|
||||
ActionFilters actionFilters, Client client, JobManager jobManager,
|
||||
JobResultsProvider jobResultsProvider) {
|
||||
super(DeleteCalendarAction.NAME, transportService, actionFilters,
|
||||
(Supplier<DeleteCalendarAction.Request>) DeleteCalendarAction.Request::new);
|
||||
super(DeleteCalendarAction.NAME, transportService, DeleteCalendarAction.Request::new, actionFilters
|
||||
);
|
||||
this.client = client;
|
||||
this.jobManager = jobManager;
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
|
|
|
@ -42,7 +42,7 @@ public class TransportDeleteCalendarEventAction extends HandledTransportAction<D
|
|||
@Inject
|
||||
public TransportDeleteCalendarEventAction(TransportService transportService, ActionFilters actionFilters,
|
||||
Client client, JobResultsProvider jobResultsProvider, JobManager jobManager) {
|
||||
super(DeleteCalendarEventAction.NAME, transportService, actionFilters, DeleteCalendarEventAction.Request::new);
|
||||
super(DeleteCalendarEventAction.NAME, transportService, DeleteCalendarEventAction.Request::new, actionFilters);
|
||||
this.client = client;
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobManager = jobManager;
|
||||
|
|
|
@ -40,7 +40,7 @@ public class TransportDeleteExpiredDataAction extends HandledTransportAction<Del
|
|||
@Inject
|
||||
public TransportDeleteExpiredDataAction(ThreadPool threadPool, TransportService transportService,
|
||||
ActionFilters actionFilters, Client client, ClusterService clusterService) {
|
||||
super(DeleteExpiredDataAction.NAME, transportService, actionFilters, DeleteExpiredDataAction.Request::new);
|
||||
super(DeleteExpiredDataAction.NAME, transportService, DeleteExpiredDataAction.Request::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.client = ClientHelper.clientWithOrigin(client, ClientHelper.ML_ORIGIN);
|
||||
this.clusterService = clusterService;
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.elasticsearch.xpack.ml.job.persistence.JobConfigProvider;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
@ -45,8 +44,8 @@ public class TransportDeleteFilterAction extends HandledTransportAction<DeleteFi
|
|||
public TransportDeleteFilterAction(TransportService transportService,
|
||||
ActionFilters actionFilters, Client client,
|
||||
JobConfigProvider jobConfigProvider) {
|
||||
super(DeleteFilterAction.NAME, transportService, actionFilters,
|
||||
(Supplier<DeleteFilterAction.Request>) DeleteFilterAction.Request::new);
|
||||
super(DeleteFilterAction.NAME, transportService, DeleteFilterAction.Request::new, actionFilters
|
||||
);
|
||||
this.client = client;
|
||||
this.jobConfigProvider = jobConfigProvider;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class TransportDeleteForecastAction extends HandledTransportAction<Delete
|
|||
|
||||
@Inject
|
||||
public TransportDeleteForecastAction(TransportService transportService, ActionFilters actionFilters, Client client) {
|
||||
super(DeleteForecastAction.NAME, transportService, actionFilters, DeleteForecastAction.Request::new);
|
||||
super(DeleteForecastAction.NAME, transportService, DeleteForecastAction.Request::new, actionFilters);
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class TransportDeleteModelSnapshotAction extends HandledTransportAction<D
|
|||
public TransportDeleteModelSnapshotAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider, Client client, JobManager jobManager,
|
||||
Auditor auditor) {
|
||||
super(DeleteModelSnapshotAction.NAME, transportService, actionFilters, DeleteModelSnapshotAction.Request::new);
|
||||
super(DeleteModelSnapshotAction.NAME, transportService, DeleteModelSnapshotAction.Request::new, actionFilters);
|
||||
this.client = client;
|
||||
this.jobManager = jobManager;
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
|
|
|
@ -30,7 +30,7 @@ public class TransportEvaluateDataFrameAction extends HandledTransportAction<Eva
|
|||
@Inject
|
||||
public TransportEvaluateDataFrameAction(TransportService transportService, ActionFilters actionFilters, ThreadPool threadPool,
|
||||
Client client) {
|
||||
super(EvaluateDataFrameAction.NAME, transportService, actionFilters, EvaluateDataFrameAction.Request::new);
|
||||
super(EvaluateDataFrameAction.NAME, transportService, EvaluateDataFrameAction.Request::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.client = client;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class TransportFindFileStructureAction
|
|||
|
||||
@Inject
|
||||
public TransportFindFileStructureAction(TransportService transportService, ActionFilters actionFilters, ThreadPool threadPool) {
|
||||
super(FindFileStructureAction.NAME, transportService, actionFilters, FindFileStructureAction.Request::new);
|
||||
super(FindFileStructureAction.NAME, transportService, FindFileStructureAction.Request::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ import org.elasticsearch.xpack.ml.job.JobManager;
|
|||
import org.elasticsearch.xpack.ml.job.persistence.BucketsQueryBuilder;
|
||||
import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportGetBucketsAction extends HandledTransportAction<GetBucketsAction.Request, GetBucketsAction.Response> {
|
||||
|
||||
private final JobResultsProvider jobResultsProvider;
|
||||
|
@ -28,7 +26,7 @@ public class TransportGetBucketsAction extends HandledTransportAction<GetBuckets
|
|||
@Inject
|
||||
public TransportGetBucketsAction(TransportService transportService, ActionFilters actionFilters, JobResultsProvider jobResultsProvider,
|
||||
JobManager jobManager, Client client) {
|
||||
super(GetBucketsAction.NAME, transportService, actionFilters, (Supplier<GetBucketsAction.Request>) GetBucketsAction.Request::new);
|
||||
super(GetBucketsAction.NAME, transportService, GetBucketsAction.Request::new, actionFilters);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobManager = jobManager;
|
||||
this.client = client;
|
||||
|
|
|
@ -11,9 +11,9 @@ import org.elasticsearch.action.support.HandledTransportAction;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.elasticsearch.xpack.core.action.util.QueryPage;
|
||||
import org.elasticsearch.xpack.core.ml.action.GetCalendarEventsAction;
|
||||
import org.elasticsearch.xpack.core.ml.action.GetCalendarsAction;
|
||||
import org.elasticsearch.xpack.core.action.util.QueryPage;
|
||||
import org.elasticsearch.xpack.core.ml.calendars.ScheduledEvent;
|
||||
import org.elasticsearch.xpack.core.ml.job.config.Job;
|
||||
import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper;
|
||||
|
@ -22,7 +22,6 @@ import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
|||
import org.elasticsearch.xpack.ml.job.persistence.ScheduledEventsQueryBuilder;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportGetCalendarEventsAction extends HandledTransportAction<GetCalendarEventsAction.Request,
|
||||
GetCalendarEventsAction.Response> {
|
||||
|
@ -34,8 +33,8 @@ public class TransportGetCalendarEventsAction extends HandledTransportAction<Get
|
|||
public TransportGetCalendarEventsAction(TransportService transportService,
|
||||
ActionFilters actionFilters, JobResultsProvider jobResultsProvider,
|
||||
JobConfigProvider jobConfigProvider) {
|
||||
super(GetCalendarEventsAction.NAME, transportService, actionFilters,
|
||||
(Supplier<GetCalendarEventsAction.Request>) GetCalendarEventsAction.Request::new);
|
||||
super(GetCalendarEventsAction.NAME, transportService, GetCalendarEventsAction.Request::new, actionFilters
|
||||
);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobConfigProvider = jobConfigProvider;
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ public class TransportGetCalendarsAction extends HandledTransportAction<GetCalen
|
|||
@Inject
|
||||
public TransportGetCalendarsAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider) {
|
||||
super(GetCalendarsAction.NAME, transportService, actionFilters,
|
||||
GetCalendarsAction.Request::new);
|
||||
super(GetCalendarsAction.NAME, transportService, GetCalendarsAction.Request::new, actionFilters
|
||||
);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@ import org.elasticsearch.xpack.core.ml.action.GetCategoriesAction;
|
|||
import org.elasticsearch.xpack.ml.job.JobManager;
|
||||
import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportGetCategoriesAction extends HandledTransportAction<GetCategoriesAction.Request, GetCategoriesAction.Response> {
|
||||
|
||||
private final JobResultsProvider jobResultsProvider;
|
||||
|
@ -27,8 +25,8 @@ public class TransportGetCategoriesAction extends HandledTransportAction<GetCate
|
|||
@Inject
|
||||
public TransportGetCategoriesAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider, Client client, JobManager jobManager) {
|
||||
super(GetCategoriesAction.NAME, transportService, actionFilters,
|
||||
(Supplier<GetCategoriesAction.Request>) GetCategoriesAction.Request::new);
|
||||
super(GetCategoriesAction.NAME, transportService, GetCategoriesAction.Request::new, actionFilters
|
||||
);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.client = client;
|
||||
this.jobManager = jobManager;
|
||||
|
|
|
@ -17,8 +17,6 @@ import org.elasticsearch.xpack.ml.job.JobManager;
|
|||
import org.elasticsearch.xpack.ml.job.persistence.InfluencersQueryBuilder;
|
||||
import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportGetInfluencersAction extends HandledTransportAction<GetInfluencersAction.Request, GetInfluencersAction.Response> {
|
||||
|
||||
private final JobResultsProvider jobResultsProvider;
|
||||
|
@ -28,8 +26,8 @@ public class TransportGetInfluencersAction extends HandledTransportAction<GetInf
|
|||
@Inject
|
||||
public TransportGetInfluencersAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider, Client client, JobManager jobManager) {
|
||||
super(GetInfluencersAction.NAME, transportService, actionFilters,
|
||||
(Supplier<GetInfluencersAction.Request>) GetInfluencersAction.Request::new);
|
||||
super(GetInfluencersAction.NAME, transportService, GetInfluencersAction.Request::new, actionFilters
|
||||
);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.client = client;
|
||||
this.jobManager = jobManager;
|
||||
|
|
|
@ -28,7 +28,7 @@ public class TransportGetModelSnapshotsAction extends HandledTransportAction<Get
|
|||
@Inject
|
||||
public TransportGetModelSnapshotsAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider, JobManager jobManager) {
|
||||
super(GetModelSnapshotsAction.NAME, transportService, actionFilters, GetModelSnapshotsAction.Request::new);
|
||||
super(GetModelSnapshotsAction.NAME, transportService, GetModelSnapshotsAction.Request::new, actionFilters);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobManager = jobManager;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.elasticsearch.search.builder.SearchSourceBuilder;
|
|||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction;
|
||||
import org.elasticsearch.xpack.core.action.util.QueryPage;
|
||||
import org.elasticsearch.xpack.core.ml.action.GetOverallBucketsAction;
|
||||
import org.elasticsearch.xpack.core.ml.job.config.Job;
|
||||
import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex;
|
||||
import org.elasticsearch.xpack.core.ml.job.results.Bucket;
|
||||
|
@ -46,7 +46,6 @@ import org.elasticsearch.xpack.ml.utils.MlIndicesUtils;
|
|||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
@ -65,8 +64,8 @@ public class TransportGetOverallBucketsAction extends HandledTransportAction<Get
|
|||
@Inject
|
||||
public TransportGetOverallBucketsAction(ThreadPool threadPool, TransportService transportService, ActionFilters actionFilters,
|
||||
ClusterService clusterService, JobManager jobManager, Client client) {
|
||||
super(GetOverallBucketsAction.NAME, transportService, actionFilters,
|
||||
(Supplier<GetOverallBucketsAction.Request>) GetOverallBucketsAction.Request::new);
|
||||
super(GetOverallBucketsAction.NAME, transportService, GetOverallBucketsAction.Request::new, actionFilters
|
||||
);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = clusterService;
|
||||
this.client = client;
|
||||
|
|
|
@ -17,8 +17,6 @@ import org.elasticsearch.xpack.ml.job.JobManager;
|
|||
import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
||||
import org.elasticsearch.xpack.ml.job.persistence.RecordsQueryBuilder;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportGetRecordsAction extends HandledTransportAction<GetRecordsAction.Request, GetRecordsAction.Response> {
|
||||
|
||||
private final JobResultsProvider jobResultsProvider;
|
||||
|
@ -28,7 +26,7 @@ public class TransportGetRecordsAction extends HandledTransportAction<GetRecords
|
|||
@Inject
|
||||
public TransportGetRecordsAction(TransportService transportService, ActionFilters actionFilters, JobResultsProvider jobResultsProvider,
|
||||
JobManager jobManager, Client client) {
|
||||
super(GetRecordsAction.NAME, transportService, actionFilters, (Supplier<GetRecordsAction.Request>) GetRecordsAction.Request::new);
|
||||
super(GetRecordsAction.NAME, transportService, GetRecordsAction.Request::new, actionFilters);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobManager = jobManager;
|
||||
this.client = client;
|
||||
|
|
|
@ -29,7 +29,6 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportMlInfoAction extends HandledTransportAction<MlInfoAction.Request, MlInfoAction.Response> {
|
||||
|
||||
|
@ -39,7 +38,7 @@ public class TransportMlInfoAction extends HandledTransportAction<MlInfoAction.R
|
|||
@Inject
|
||||
public TransportMlInfoAction(TransportService transportService, ActionFilters actionFilters,
|
||||
ClusterService clusterService, Environment env) {
|
||||
super(MlInfoAction.NAME, transportService, actionFilters, (Supplier<MlInfoAction.Request>) MlInfoAction.Request::new);
|
||||
super(MlInfoAction.NAME, transportService, MlInfoAction.Request::new, actionFilters);
|
||||
this.clusterService = clusterService;
|
||||
|
||||
try {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TransportPostCalendarEventsAction extends HandledTransportAction<Po
|
|||
@Inject
|
||||
public TransportPostCalendarEventsAction(TransportService transportService, ActionFilters actionFilters, Client client,
|
||||
JobResultsProvider jobResultsProvider, JobManager jobManager) {
|
||||
super(PostCalendarEventsAction.NAME, transportService, actionFilters, PostCalendarEventsAction.Request::new);
|
||||
super(PostCalendarEventsAction.NAME, transportService, PostCalendarEventsAction.Request::new, actionFilters);
|
||||
this.client = client;
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobManager = jobManager;
|
||||
|
|
|
@ -33,7 +33,6 @@ import java.io.InputStreamReader;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TransportPreviewDatafeedAction extends HandledTransportAction<PreviewDatafeedAction.Request, PreviewDatafeedAction.Response> {
|
||||
|
@ -51,8 +50,8 @@ public class TransportPreviewDatafeedAction extends HandledTransportAction<Previ
|
|||
ActionFilters actionFilters, Client client, JobConfigProvider jobConfigProvider,
|
||||
DatafeedConfigProvider datafeedConfigProvider, JobResultsProvider jobResultsProvider,
|
||||
JobResultsPersister jobResultsPersister, NamedXContentRegistry xContentRegistry) {
|
||||
super(PreviewDatafeedAction.NAME, transportService, actionFilters,
|
||||
(Supplier<PreviewDatafeedAction.Request>) PreviewDatafeedAction.Request::new);
|
||||
super(PreviewDatafeedAction.NAME, transportService, PreviewDatafeedAction.Request::new, actionFilters
|
||||
);
|
||||
this.threadPool = threadPool;
|
||||
this.client = client;
|
||||
this.jobConfigProvider = jobConfigProvider;
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.elasticsearch.xpack.core.ml.utils.ToXContentParams;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
@ -40,8 +39,8 @@ public class TransportPutCalendarAction extends HandledTransportAction<PutCalend
|
|||
|
||||
@Inject
|
||||
public TransportPutCalendarAction(TransportService transportService, ActionFilters actionFilters, Client client) {
|
||||
super(PutCalendarAction.NAME, transportService, actionFilters,
|
||||
(Supplier<PutCalendarAction.Request>) PutCalendarAction.Request::new);
|
||||
super(PutCalendarAction.NAME, transportService, PutCalendarAction.Request::new, actionFilters
|
||||
);
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ import java.io.IOException;
|
|||
import java.time.Instant;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportPutDataFrameAnalyticsAction
|
||||
extends HandledTransportAction<PutDataFrameAnalyticsAction.Request, PutDataFrameAnalyticsAction.Response> {
|
||||
|
@ -73,8 +72,8 @@ public class TransportPutDataFrameAnalyticsAction
|
|||
XPackLicenseState licenseState, Client client, ThreadPool threadPool,
|
||||
ClusterService clusterService, IndexNameExpressionResolver indexNameExpressionResolver,
|
||||
DataFrameAnalyticsConfigProvider configProvider) {
|
||||
super(PutDataFrameAnalyticsAction.NAME, transportService, actionFilters,
|
||||
(Supplier<PutDataFrameAnalyticsAction.Request>) PutDataFrameAnalyticsAction.Request::new);
|
||||
super(PutDataFrameAnalyticsAction.NAME, transportService, PutDataFrameAnalyticsAction.Request::new, actionFilters
|
||||
);
|
||||
this.licenseState = licenseState;
|
||||
this.configProvider = configProvider;
|
||||
this.threadPool = threadPool;
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.elasticsearch.xpack.core.ml.utils.ToXContentParams;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
@ -41,7 +40,7 @@ public class TransportPutFilterAction extends HandledTransportAction<PutFilterAc
|
|||
|
||||
@Inject
|
||||
public TransportPutFilterAction(TransportService transportService, ActionFilters actionFilters, Client client) {
|
||||
super(PutFilterAction.NAME, transportService, actionFilters, (Supplier<PutFilterAction.Request>) PutFilterAction.Request::new);
|
||||
super(PutFilterAction.NAME, transportService, PutFilterAction.Request::new, actionFilters);
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public class TransportUpdateCalendarJobAction extends HandledTransportAction<Upd
|
|||
@Inject
|
||||
public TransportUpdateCalendarJobAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider, JobManager jobManager) {
|
||||
super(UpdateCalendarJobAction.NAME, transportService, actionFilters, UpdateCalendarJobAction.Request::new);
|
||||
super(UpdateCalendarJobAction.NAME, transportService, UpdateCalendarJobAction.Request::new, actionFilters);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.jobManager = jobManager;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ import java.io.InputStream;
|
|||
import java.util.Collections;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
@ -57,8 +56,8 @@ public class TransportUpdateFilterAction extends HandledTransportAction<UpdateFi
|
|||
@Inject
|
||||
public TransportUpdateFilterAction(TransportService transportService, ActionFilters actionFilters, Client client,
|
||||
JobManager jobManager, ClusterService clusterService) {
|
||||
super(UpdateFilterAction.NAME, transportService, actionFilters,
|
||||
(Supplier<UpdateFilterAction.Request>) UpdateFilterAction.Request::new);
|
||||
super(UpdateFilterAction.NAME, transportService, UpdateFilterAction.Request::new, actionFilters
|
||||
);
|
||||
this.client = client;
|
||||
this.jobManager = jobManager;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class TransportUpdateModelSnapshotAction extends HandledTransportAction<U
|
|||
@Inject
|
||||
public TransportUpdateModelSnapshotAction(TransportService transportService, ActionFilters actionFilters,
|
||||
JobResultsProvider jobResultsProvider, Client client) {
|
||||
super(UpdateModelSnapshotAction.NAME, transportService, actionFilters, UpdateModelSnapshotAction.Request::new);
|
||||
super(UpdateModelSnapshotAction.NAME, transportService, UpdateModelSnapshotAction.Request::new, actionFilters);
|
||||
this.jobResultsProvider = jobResultsProvider;
|
||||
this.client = client;
|
||||
}
|
||||
|
|
|
@ -14,14 +14,12 @@ import org.elasticsearch.tasks.Task;
|
|||
import org.elasticsearch.transport.TransportService;
|
||||
import org.elasticsearch.xpack.core.ml.action.ValidateDetectorAction;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportValidateDetectorAction extends HandledTransportAction<ValidateDetectorAction.Request, AcknowledgedResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportValidateDetectorAction(TransportService transportService, ActionFilters actionFilters) {
|
||||
super(ValidateDetectorAction.NAME, transportService, actionFilters,
|
||||
(Supplier<ValidateDetectorAction.Request>) ValidateDetectorAction.Request::new);
|
||||
super(ValidateDetectorAction.NAME, transportService, ValidateDetectorAction.Request::new, actionFilters
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,14 +14,12 @@ import org.elasticsearch.tasks.Task;
|
|||
import org.elasticsearch.transport.TransportService;
|
||||
import org.elasticsearch.xpack.core.ml.action.ValidateJobConfigAction;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportValidateJobConfigAction extends HandledTransportAction<ValidateJobConfigAction.Request, AcknowledgedResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportValidateJobConfigAction(TransportService transportService, ActionFilters actionFilters) {
|
||||
super(ValidateJobConfigAction.NAME, transportService, actionFilters,
|
||||
(Supplier< ValidateJobConfigAction.Request>) ValidateJobConfigAction.Request::new);
|
||||
super(ValidateJobConfigAction.NAME, transportService, ValidateJobConfigAction.Request::new, actionFilters
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,7 @@ public class TransportMonitoringBulkAction extends HandledTransportAction<Monito
|
|||
public TransportMonitoringBulkAction(ThreadPool threadPool, ClusterService clusterService,
|
||||
TransportService transportService, ActionFilters actionFilters, Exporters exportService,
|
||||
MonitoringService monitoringService) {
|
||||
super(MonitoringBulkAction.NAME, transportService, actionFilters, MonitoringBulkRequest::new);
|
||||
super(MonitoringBulkAction.NAME, transportService, MonitoringBulkRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.clusterService = clusterService;
|
||||
this.exportService = exportService;
|
||||
|
|
|
@ -28,7 +28,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TransportGetRollupCapsAction extends HandledTransportAction<GetRollupCapsAction.Request, GetRollupCapsAction.Response> {
|
||||
|
@ -37,8 +36,8 @@ public class TransportGetRollupCapsAction extends HandledTransportAction<GetRoll
|
|||
|
||||
@Inject
|
||||
public TransportGetRollupCapsAction(TransportService transportService, ClusterService clusterService, ActionFilters actionFilters) {
|
||||
super(GetRollupCapsAction.NAME, transportService, actionFilters,
|
||||
(Supplier<GetRollupCapsAction.Request>) GetRollupCapsAction.Request::new);
|
||||
super(GetRollupCapsAction.NAME, transportService, GetRollupCapsAction.Request::new, actionFilters
|
||||
);
|
||||
this.clusterService = clusterService;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
|
@ -36,8 +35,8 @@ public class TransportGetRollupIndexCapsAction extends HandledTransportAction<Ge
|
|||
@Inject
|
||||
public TransportGetRollupIndexCapsAction(TransportService transportService, ClusterService clusterService,
|
||||
ActionFilters actionFilters) {
|
||||
super(GetRollupIndexCapsAction.NAME, transportService, actionFilters,
|
||||
(Supplier<GetRollupIndexCapsAction.Request>) GetRollupIndexCapsAction.Request::new);
|
||||
super(GetRollupIndexCapsAction.NAME, transportService, GetRollupIndexCapsAction.Request::new, actionFilters
|
||||
);
|
||||
this.clusterService = clusterService;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class TransportDeletePrivilegesAction extends HandledTransportAction<Dele
|
|||
@Inject
|
||||
public TransportDeletePrivilegesAction(ActionFilters actionFilters, NativePrivilegeStore privilegeStore,
|
||||
TransportService transportService) {
|
||||
super(DeletePrivilegesAction.NAME, transportService, actionFilters, DeletePrivilegesRequest::new);
|
||||
super(DeletePrivilegesAction.NAME, transportService, DeletePrivilegesRequest::new, actionFilters);
|
||||
this.privilegeStore = privilegeStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class TransportGetBuiltinPrivilegesAction extends HandledTransportAction<
|
|||
|
||||
@Inject
|
||||
public TransportGetBuiltinPrivilegesAction(ActionFilters actionFilters, TransportService transportService) {
|
||||
super(GetBuiltinPrivilegesAction.NAME, transportService, actionFilters, GetBuiltinPrivilegesRequest::new);
|
||||
super(GetBuiltinPrivilegesAction.NAME, transportService, GetBuiltinPrivilegesRequest::new, actionFilters);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TransportGetPrivilegesAction extends HandledTransportAction<GetPriv
|
|||
@Inject
|
||||
public TransportGetPrivilegesAction(ActionFilters actionFilters, NativePrivilegeStore privilegeStore,
|
||||
TransportService transportService) {
|
||||
super(GetPrivilegesAction.NAME, transportService, actionFilters, GetPrivilegesRequest::new);
|
||||
super(GetPrivilegesAction.NAME, transportService, GetPrivilegesRequest::new, actionFilters);
|
||||
this.privilegeStore = privilegeStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class TransportPutPrivilegesAction extends HandledTransportAction<PutPriv
|
|||
@Inject
|
||||
public TransportPutPrivilegesAction(ActionFilters actionFilters, NativePrivilegeStore privilegeStore,
|
||||
TransportService transportService) {
|
||||
super(PutPrivilegesAction.NAME, transportService, actionFilters, PutPrivilegesRequest::new);
|
||||
super(PutPrivilegesAction.NAME, transportService, PutPrivilegesRequest::new, actionFilters);
|
||||
this.privilegeStore = privilegeStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public class TransportDeleteRoleAction extends HandledTransportAction<DeleteRole
|
|||
|
||||
@Inject
|
||||
public TransportDeleteRoleAction(ActionFilters actionFilters, NativeRolesStore rolesStore, TransportService transportService) {
|
||||
super(DeleteRoleAction.NAME, transportService, actionFilters, DeleteRoleRequest::new);
|
||||
super(DeleteRoleAction.NAME, transportService, DeleteRoleRequest::new, actionFilters);
|
||||
this.rolesStore = rolesStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class TransportGetRolesAction extends HandledTransportAction<GetRolesRequ
|
|||
@Inject
|
||||
public TransportGetRolesAction(ActionFilters actionFilters, NativeRolesStore nativeRolesStore, TransportService transportService,
|
||||
ReservedRolesStore reservedRolesStore) {
|
||||
super(GetRolesAction.NAME, transportService, actionFilters, GetRolesRequest::new);
|
||||
super(GetRolesAction.NAME, transportService, GetRolesRequest::new, actionFilters);
|
||||
this.nativeRolesStore = nativeRolesStore;
|
||||
this.reservedRolesStore = reservedRolesStore;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class TransportPutRoleAction extends HandledTransportAction<PutRoleReques
|
|||
|
||||
@Inject
|
||||
public TransportPutRoleAction(ActionFilters actionFilters, NativeRolesStore rolesStore, TransportService transportService) {
|
||||
super(PutRoleAction.NAME, transportService, actionFilters, PutRoleRequest::new);
|
||||
super(PutRoleAction.NAME, transportService, PutRoleRequest::new, actionFilters);
|
||||
this.rolesStore = rolesStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class TransportDeleteRoleMappingAction
|
|||
@Inject
|
||||
public TransportDeleteRoleMappingAction(ActionFilters actionFilters, TransportService transportService,
|
||||
NativeRoleMappingStore roleMappingStore) {
|
||||
super(DeleteRoleMappingAction.NAME, transportService, actionFilters, DeleteRoleMappingRequest::new);
|
||||
super(DeleteRoleMappingAction.NAME, transportService, DeleteRoleMappingRequest::new, actionFilters);
|
||||
this.roleMappingStore = roleMappingStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class TransportGetRoleMappingsAction
|
|||
@Inject
|
||||
public TransportGetRoleMappingsAction(ActionFilters actionFilters, TransportService transportService,
|
||||
NativeRoleMappingStore nativeRoleMappingStore) {
|
||||
super(GetRoleMappingsAction.NAME, transportService, actionFilters, GetRoleMappingsRequest::new);
|
||||
super(GetRoleMappingsAction.NAME, transportService, GetRoleMappingsRequest::new, actionFilters);
|
||||
this.roleMappingStore = nativeRoleMappingStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class TransportPutRoleMappingAction
|
|||
@Inject
|
||||
public TransportPutRoleMappingAction(ActionFilters actionFilters, TransportService transportService,
|
||||
NativeRoleMappingStore roleMappingStore) {
|
||||
super(PutRoleMappingAction.NAME, transportService, actionFilters, PutRoleMappingRequest::new);
|
||||
super(PutRoleMappingAction.NAME, transportService, PutRoleMappingRequest::new, actionFilters);
|
||||
this.roleMappingStore = roleMappingStore;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public final class TransportSamlAuthenticateAction extends HandledTransportActio
|
|||
public TransportSamlAuthenticateAction(ThreadPool threadPool, TransportService transportService,
|
||||
ActionFilters actionFilters, AuthenticationService authenticationService,
|
||||
TokenService tokenService) {
|
||||
super(SamlAuthenticateAction.NAME, transportService, actionFilters, SamlAuthenticateRequest::new);
|
||||
super(SamlAuthenticateAction.NAME, transportService, SamlAuthenticateRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.authenticationService = authenticationService;
|
||||
this.tokenService = tokenService;
|
||||
|
|
|
@ -47,7 +47,7 @@ public final class TransportSamlInvalidateSessionAction
|
|||
@Inject
|
||||
public TransportSamlInvalidateSessionAction(TransportService transportService, ActionFilters actionFilters, TokenService tokenService,
|
||||
Realms realms) {
|
||||
super(SamlInvalidateSessionAction.NAME, transportService, actionFilters, SamlInvalidateSessionRequest::new);
|
||||
super(SamlInvalidateSessionAction.NAME, transportService, SamlInvalidateSessionRequest::new, actionFilters);
|
||||
this.tokenService = tokenService;
|
||||
this.realms = realms;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class TransportSamlLogoutAction
|
|||
@Inject
|
||||
public TransportSamlLogoutAction(TransportService transportService, ActionFilters actionFilters, Realms realms,
|
||||
TokenService tokenService) {
|
||||
super(SamlLogoutAction.NAME, transportService, actionFilters, SamlLogoutRequest::new);
|
||||
super(SamlLogoutAction.NAME, transportService, SamlLogoutRequest::new, actionFilters);
|
||||
this.realms = realms;
|
||||
this.tokenService = tokenService;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ public final class TransportSamlPrepareAuthenticationAction
|
|||
|
||||
@Inject
|
||||
public TransportSamlPrepareAuthenticationAction(TransportService transportService, ActionFilters actionFilters, Realms realms) {
|
||||
super(SamlPrepareAuthenticationAction.NAME, transportService, actionFilters,
|
||||
SamlPrepareAuthenticationRequest::new);
|
||||
super(SamlPrepareAuthenticationAction.NAME, transportService, SamlPrepareAuthenticationRequest::new, actionFilters
|
||||
);
|
||||
this.realms = realms;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class TransportCreateTokenAction extends HandledTransportAction<Cre
|
|||
@Inject
|
||||
public TransportCreateTokenAction(ThreadPool threadPool, TransportService transportService, ActionFilters actionFilters,
|
||||
TokenService tokenService, AuthenticationService authenticationService) {
|
||||
super(CreateTokenAction.NAME, transportService, actionFilters, CreateTokenRequest::new);
|
||||
super(CreateTokenAction.NAME, transportService, CreateTokenRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.tokenService = tokenService;
|
||||
this.authenticationService = authenticationService;
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class TransportInvalidateTokenAction extends HandledTransportAction
|
|||
|
||||
@Inject
|
||||
public TransportInvalidateTokenAction(TransportService transportService, ActionFilters actionFilters, TokenService tokenService) {
|
||||
super(InvalidateTokenAction.NAME, transportService, actionFilters, InvalidateTokenRequest::new);
|
||||
super(InvalidateTokenAction.NAME, transportService, InvalidateTokenRequest::new, actionFilters);
|
||||
this.tokenService = tokenService;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class TransportRefreshTokenAction extends HandledTransportAction<CreateTo
|
|||
|
||||
@Inject
|
||||
public TransportRefreshTokenAction(TransportService transportService, ActionFilters actionFilters, TokenService tokenService) {
|
||||
super(RefreshTokenAction.NAME, transportService, actionFilters, CreateTokenRequest::new);
|
||||
super(RefreshTokenAction.NAME, transportService, CreateTokenRequest::new, actionFilters);
|
||||
this.tokenService = tokenService;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,15 +21,13 @@ import org.elasticsearch.xpack.core.security.user.SystemUser;
|
|||
import org.elasticsearch.xpack.core.security.user.User;
|
||||
import org.elasticsearch.xpack.core.security.user.XPackUser;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportAuthenticateAction extends HandledTransportAction<AuthenticateRequest, AuthenticateResponse> {
|
||||
|
||||
private final SecurityContext securityContext;
|
||||
|
||||
@Inject
|
||||
public TransportAuthenticateAction(TransportService transportService, ActionFilters actionFilters, SecurityContext securityContext) {
|
||||
super(AuthenticateAction.NAME, transportService, actionFilters, (Supplier<AuthenticateRequest>) AuthenticateRequest::new);
|
||||
super(AuthenticateAction.NAME, transportService, AuthenticateRequest::new, actionFilters);
|
||||
this.securityContext = securityContext;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class TransportChangePasswordAction extends HandledTransportAction<Change
|
|||
@Inject
|
||||
public TransportChangePasswordAction(Settings settings, TransportService transportService,
|
||||
ActionFilters actionFilters, NativeUsersStore nativeUsersStore) {
|
||||
super(ChangePasswordAction.NAME, transportService, actionFilters, ChangePasswordRequest::new);
|
||||
super(ChangePasswordAction.NAME, transportService, ChangePasswordRequest::new, actionFilters);
|
||||
this.settings = settings;
|
||||
this.nativeUsersStore = nativeUsersStore;
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@ import org.elasticsearch.xpack.core.security.user.SystemUser;
|
|||
import org.elasticsearch.xpack.core.security.user.XPackUser;
|
||||
import org.elasticsearch.xpack.security.authc.esnative.NativeUsersStore;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class TransportDeleteUserAction extends HandledTransportAction<DeleteUserRequest, DeleteUserResponse> {
|
||||
|
||||
private final Settings settings;
|
||||
|
@ -31,7 +29,7 @@ public class TransportDeleteUserAction extends HandledTransportAction<DeleteUser
|
|||
@Inject
|
||||
public TransportDeleteUserAction(Settings settings, ActionFilters actionFilters,
|
||||
NativeUsersStore usersStore, TransportService transportService) {
|
||||
super(DeleteUserAction.NAME, transportService, actionFilters, (Supplier<DeleteUserRequest>) DeleteUserRequest::new);
|
||||
super(DeleteUserAction.NAME, transportService, DeleteUserRequest::new, actionFilters);
|
||||
this.settings = settings;
|
||||
this.usersStore = usersStore;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class TransportGetUsersAction extends HandledTransportAction<GetUsersRequ
|
|||
@Inject
|
||||
public TransportGetUsersAction(Settings settings, ActionFilters actionFilters,
|
||||
NativeUsersStore usersStore, TransportService transportService, ReservedRealm reservedRealm) {
|
||||
super(GetUsersAction.NAME, transportService, actionFilters, GetUsersRequest::new);
|
||||
super(GetUsersAction.NAME, transportService, GetUsersRequest::new, actionFilters);
|
||||
this.settings = settings;
|
||||
this.usersStore = usersStore;
|
||||
this.reservedRealm = reservedRealm;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class TransportHasPrivilegesAction extends HandledTransportAction<HasPriv
|
|||
public TransportHasPrivilegesAction(ThreadPool threadPool, TransportService transportService,
|
||||
ActionFilters actionFilters, AuthorizationService authorizationService,
|
||||
NativePrivilegeStore privilegeStore) {
|
||||
super(HasPrivilegesAction.NAME, transportService, actionFilters, HasPrivilegesRequest::new);
|
||||
super(HasPrivilegesAction.NAME, transportService, HasPrivilegesRequest::new, actionFilters);
|
||||
this.threadPool = threadPool;
|
||||
this.authorizationService = authorizationService;
|
||||
this.privilegeStore = privilegeStore;
|
||||
|
|
|
@ -36,7 +36,7 @@ public class TransportPutUserAction extends HandledTransportAction<PutUserReques
|
|||
@Inject
|
||||
public TransportPutUserAction(Settings settings, ActionFilters actionFilters,
|
||||
NativeUsersStore usersStore, TransportService transportService) {
|
||||
super(PutUserAction.NAME, transportService, actionFilters, PutUserRequest::new);
|
||||
super(PutUserAction.NAME, transportService, PutUserRequest::new, actionFilters);
|
||||
this.settings = settings;
|
||||
this.usersStore = usersStore;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TransportSetEnabledAction extends HandledTransportAction<SetEnabled
|
|||
@Inject
|
||||
public TransportSetEnabledAction(Settings settings, ThreadPool threadPool, TransportService transportService,
|
||||
ActionFilters actionFilters, NativeUsersStore usersStore) {
|
||||
super(SetEnabledAction.NAME, transportService, actionFilters, SetEnabledRequest::new);
|
||||
super(SetEnabledAction.NAME, transportService, SetEnabledRequest::new, actionFilters);
|
||||
this.settings = settings;
|
||||
this.threadPool = threadPool;
|
||||
this.usersStore = usersStore;
|
||||
|
|
|
@ -21,8 +21,6 @@ import org.elasticsearch.transport.TransportService;
|
|||
import org.elasticsearch.xpack.core.watcher.transport.actions.delete.DeleteWatchAction;
|
||||
import org.elasticsearch.xpack.core.watcher.watch.Watch;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.WATCHER_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
||||
|
@ -36,7 +34,7 @@ public class TransportDeleteWatchAction extends HandledTransportAction<DeleteWat
|
|||
|
||||
@Inject
|
||||
public TransportDeleteWatchAction(TransportService transportService, ActionFilters actionFilters, Client client) {
|
||||
super(DeleteWatchAction.NAME, transportService, actionFilters, (Supplier<DeleteWatchRequest>) DeleteWatchRequest::new);
|
||||
super(DeleteWatchAction.NAME, transportService, DeleteWatchRequest::new, actionFilters);
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue