Skip to content

Commit ecbaa38

Browse files
author
Christoph Büscher
authored
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.
1 parent 23805fa commit ecbaa38

File tree

1 file changed

+0
-103
lines changed
  • server/src/main/java/org/elasticsearch/plugins

1 file changed

+0
-103
lines changed

server/src/main/java/org/elasticsearch/plugins/Plugin.java

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919

2020
package org.elasticsearch.plugins;
2121

22-
import org.elasticsearch.action.ActionModule;
2322
import org.elasticsearch.bootstrap.BootstrapCheck;
2423
import org.elasticsearch.client.Client;
25-
import org.elasticsearch.cluster.ClusterModule;
2624
import org.elasticsearch.cluster.ClusterState;
2725
import org.elasticsearch.cluster.metadata.IndexMetaData;
2826
import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
@@ -32,22 +30,15 @@
3230
import org.elasticsearch.common.inject.Module;
3331
import org.elasticsearch.common.io.stream.NamedWriteable;
3432
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
35-
import org.elasticsearch.common.network.NetworkModule;
3633
import org.elasticsearch.common.settings.Setting;
3734
import org.elasticsearch.common.settings.SettingUpgrader;
3835
import org.elasticsearch.common.settings.Settings;
39-
import org.elasticsearch.common.settings.SettingsModule;
4036
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
4137
import org.elasticsearch.common.xcontent.XContentParser;
42-
import org.elasticsearch.discovery.DiscoveryModule;
4338
import org.elasticsearch.env.Environment;
4439
import org.elasticsearch.env.NodeEnvironment;
4540
import org.elasticsearch.index.IndexModule;
46-
import org.elasticsearch.indices.analysis.AnalysisModule;
47-
import org.elasticsearch.repositories.RepositoriesModule;
48-
import org.elasticsearch.script.ScriptModule;
4941
import org.elasticsearch.script.ScriptService;
50-
import org.elasticsearch.search.SearchModule;
5142
import org.elasticsearch.threadpool.ExecutorBuilder;
5243
import org.elasticsearch.threadpool.ThreadPool;
5344
import org.elasticsearch.watcher.ResourceWatcherService;
@@ -77,9 +68,6 @@
7768
* <li>{@link SearchPlugin}
7869
* <li>{@link ReloadablePlugin}
7970
* </ul>
80-
* <p>In addition to extension points this class also declares some {@code @Deprecated} {@code public final void onModule} methods. These
81-
* methods should cause any extensions of {@linkplain Plugin} that used the pre-5.x style extension syntax to fail to build and point the
82-
* 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.
8371
*/
8472
public abstract class Plugin implements Closeable {
8573

@@ -257,95 +245,4 @@ public List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings) {
257245
public void close() throws IOException {
258246

259247
}
260-
261-
/**
262-
* Old-style guice index level extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
263-
* from 2.x.
264-
*
265-
* @deprecated use #onIndexModule instead
266-
*/
267-
@Deprecated
268-
public final void onModule(IndexModule indexModule) {}
269-
270-
271-
/**
272-
* Old-style guice settings extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
273-
* from 2.x.
274-
*
275-
* @deprecated use #getSettings and #getSettingsFilter instead
276-
*/
277-
@Deprecated
278-
public final void onModule(SettingsModule settingsModule) {}
279-
280-
/**
281-
* Old-style guice scripting extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
282-
* from 2.x.
283-
*
284-
* @deprecated implement {@link ScriptPlugin} instead
285-
*/
286-
@Deprecated
287-
public final void onModule(ScriptModule module) {}
288-
289-
/**
290-
* Old-style analysis extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
291-
* from 2.x.
292-
*
293-
* @deprecated implement {@link AnalysisPlugin} instead
294-
*/
295-
@Deprecated
296-
public final void onModule(AnalysisModule module) {}
297-
298-
/**
299-
* Old-style action extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
300-
* from 2.x.
301-
*
302-
* @deprecated implement {@link ActionPlugin} instead
303-
*/
304-
@Deprecated
305-
public final void onModule(ActionModule module) {}
306-
307-
/**
308-
* Old-style search extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
309-
* from 2.x.
310-
*
311-
* @deprecated implement {@link SearchPlugin} instead
312-
*/
313-
@Deprecated
314-
public final void onModule(SearchModule module) {}
315-
316-
/**
317-
* Old-style network extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
318-
* from 2.x.
319-
*
320-
* @deprecated implement {@link NetworkPlugin} instead
321-
*/
322-
@Deprecated
323-
public final void onModule(NetworkModule module) {}
324-
325-
/**
326-
* Old-style snapshot/restore extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
327-
* from 2.x.
328-
*
329-
* @deprecated implement {@link RepositoryPlugin} instead
330-
*/
331-
@Deprecated
332-
public final void onModule(RepositoriesModule module) {}
333-
334-
/**
335-
* Old-style cluster extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
336-
* from 2.x.
337-
*
338-
* @deprecated implement {@link ClusterPlugin} instead
339-
*/
340-
@Deprecated
341-
public final void onModule(ClusterModule module) {}
342-
343-
/**
344-
* Old-style discovery extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
345-
* from 2.x.
346-
*
347-
* @deprecated implement {@link DiscoveryPlugin} instead
348-
*/
349-
@Deprecated
350-
public final void onModule(DiscoveryModule module) {}
351248
}

0 commit comments

Comments
 (0)