Remove Abstract Component (#35898)
TransportAction and BaseRestHandler now no longer extends AbstractComponent. The AbstractComponent no longer has usages so it was deleted. Closes #34488
This commit is contained in:
parent
03690d12b2
commit
df8fa9781e
|
@ -18,24 +18,28 @@
|
|||
*/
|
||||
|
||||
package org.elasticsearch.action.support;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.common.component.AbstractComponent;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.tasks.TaskListener;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public abstract class TransportAction<Request extends ActionRequest, Response extends ActionResponse> extends AbstractComponent {
|
||||
public abstract class TransportAction<Request extends ActionRequest, Response extends ActionResponse> {
|
||||
|
||||
protected final String actionName;
|
||||
private final ActionFilter[] filters;
|
||||
protected final TaskManager taskManager;
|
||||
/**
|
||||
* @deprecated declare your own logger.
|
||||
*/
|
||||
@Deprecated
|
||||
protected Logger logger = LogManager.getLogger(getClass());
|
||||
|
||||
protected TransportAction(String actionName, ActionFilters actionFilters, TaskManager taskManager) {
|
||||
this.actionName = actionName;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch 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.common.component;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
/**
|
||||
* @deprecated declare your own logger
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class AbstractComponent {
|
||||
|
||||
protected final Logger logger;
|
||||
|
||||
public AbstractComponent() {
|
||||
this.logger = LogManager.getLogger(getClass());
|
||||
}
|
||||
}
|
|
@ -18,13 +18,13 @@
|
|||
*/
|
||||
|
||||
package org.elasticsearch.rest;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.lucene.search.spell.LevenshteinDistance;
|
||||
import org.apache.lucene.util.CollectionUtil;
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.common.CheckedConsumer;
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.component.AbstractComponent;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
@ -51,12 +51,17 @@ import java.util.stream.Collectors;
|
|||
* are copied, but a selected few. It is possible to control what headers are copied over by returning them in
|
||||
* {@link ActionPlugin#getRestHeaders()}.
|
||||
*/
|
||||
public abstract class BaseRestHandler extends AbstractComponent implements RestHandler {
|
||||
public abstract class BaseRestHandler implements RestHandler {
|
||||
|
||||
public static final Setting<Boolean> MULTI_ALLOW_EXPLICIT_INDEX =
|
||||
Setting.boolSetting("rest.action.multi.allow_explicit_index", true, Property.NodeScope);
|
||||
|
||||
private final LongAdder usageCount = new LongAdder();
|
||||
/**
|
||||
* @deprecated declare your own logger.
|
||||
*/
|
||||
@Deprecated
|
||||
protected Logger logger = LogManager.getLogger(getClass());
|
||||
|
||||
/**
|
||||
* Parameter that controls whether certain REST apis should include type names in their requests or responses.
|
||||
|
|
Loading…
Reference in New Issue