Remove deprecated Plugin#onModule extension points (#37866)
Removes some guice index level extension point marked as @Deprecated since at least 6.0. They served as a signpost for plugin authors upgrading from 2.x but this shouldn't be relevant in 7.0 anymore.
This commit is contained in:
parent
23805fa41a
commit
ecbaa38864
|
@ -19,10 +19,8 @@
|
|||
|
||||
package org.elasticsearch.plugins;
|
||||
|
||||
import org.elasticsearch.action.ActionModule;
|
||||
import org.elasticsearch.bootstrap.BootstrapCheck;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterModule;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
||||
import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
|
||||
|
@ -32,22 +30,15 @@ import org.elasticsearch.common.component.LifecycleComponent;
|
|||
import org.elasticsearch.common.inject.Module;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteable;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.network.NetworkModule;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.SettingUpgrader;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.settings.SettingsModule;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.discovery.DiscoveryModule;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.index.IndexModule;
|
||||
import org.elasticsearch.indices.analysis.AnalysisModule;
|
||||
import org.elasticsearch.repositories.RepositoriesModule;
|
||||
import org.elasticsearch.script.ScriptModule;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.search.SearchModule;
|
||||
import org.elasticsearch.threadpool.ExecutorBuilder;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
|
@ -77,9 +68,6 @@ import java.util.function.UnaryOperator;
|
|||
* <li>{@link SearchPlugin}
|
||||
* <li>{@link ReloadablePlugin}
|
||||
* </ul>
|
||||
* <p>In addition to extension points this class also declares some {@code @Deprecated} {@code public final void onModule} methods. These
|
||||
* methods should cause any extensions of {@linkplain Plugin} that used the pre-5.x style extension syntax to fail to build and point the
|
||||
* plugin author at the new extension syntax. We hope that these make the process of upgrading a plugin from 2.x to 5.x only mildly painful.
|
||||
*/
|
||||
public abstract class Plugin implements Closeable {
|
||||
|
||||
|
@ -257,95 +245,4 @@ public abstract class Plugin implements Closeable {
|
|||
public void close() throws IOException {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Old-style guice index level extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated use #onIndexModule instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(IndexModule indexModule) {}
|
||||
|
||||
|
||||
/**
|
||||
* Old-style guice settings extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated use #getSettings and #getSettingsFilter instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(SettingsModule settingsModule) {}
|
||||
|
||||
/**
|
||||
* Old-style guice scripting extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link ScriptPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(ScriptModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style analysis extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link AnalysisPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(AnalysisModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style action extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link ActionPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(ActionModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style search extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link SearchPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(SearchModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style network extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link NetworkPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(NetworkModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style snapshot/restore extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link RepositoryPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(RepositoriesModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style cluster extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link ClusterPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(ClusterModule module) {}
|
||||
|
||||
/**
|
||||
* Old-style discovery extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
|
||||
* from 2.x.
|
||||
*
|
||||
* @deprecated implement {@link DiscoveryPlugin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public final void onModule(DiscoveryModule module) {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue