Package org.elasticsearch.plugins
Class PluginsService
java.lang.Object
org.elasticsearch.plugins.PluginsService
- All Implemented Interfaces:
ReportingService<PluginsAndModules>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.node.ReportingService
ReportingService.Info
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPluginsService
(Settings settings, Path configPath, Path modulesDirectory, Path pluginsDirectory, Collection<Class<? extends Plugin>> classpathPlugins) Constructs a new PluginService -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkBundleJarHell
(Set<URL> classpath, PluginsService.Bundle bundle, Map<String, Set<URL>> transitiveUrls) static void
checkForFailedPluginRemovals
(Path pluginsDirectory) <T> List<T>
filterPlugins
(Class<T> type) findPluginDirs
(Path rootPath) Extracts all installed plugin directories from the providedrootPath
.List<ExecutorBuilder<?>>
getExecutorBuilders
(Settings settings) static Set<PluginsService.Bundle>
getModuleBundles
(Path modulesDirectory) Get bundles for plugins installed in the given modules directory.static Set<PluginsService.Bundle>
getPluginBundles
(Path pluginsDirectory) Get bundles for plugins installed in the given plugins directory.info()
Get information about plugins and modulesvoid
onIndexModule
(IndexModule indexModule) static List<PluginsService.Bundle>
sortBundles
(Set<PluginsService.Bundle> bundles) Return the given bundles, sorted in dependency loading order.static void
Verify the given plugin is compatible with the current Elasticsearch installation.
-
Field Details
-
MANDATORY_SETTING
-
-
Constructor Details
-
PluginsService
public PluginsService(Settings settings, Path configPath, Path modulesDirectory, Path pluginsDirectory, Collection<Class<? extends Plugin>> classpathPlugins) Constructs a new PluginService- Parameters:
settings
- The settings of the systemmodulesDirectory
- The directory modules exist in, or null if modules should not be loaded from the filesystempluginsDirectory
- The directory plugins exist in, or null if plugins should not be loaded from the filesystemclasspathPlugins
- Plugins that exist in the classpath which should be loaded
-
-
Method Details
-
getPluginSettings
-
getPluginSettingsFilter
-
updatedSettings
-
getExecutorBuilders
-
onIndexModule
-
info
Get information about plugins and modules- Specified by:
info
in interfaceReportingService<PluginsAndModules>
-
findPluginDirs
Extracts all installed plugin directories from the providedrootPath
.- Parameters:
rootPath
- the path where the plugins are installed- Returns:
- a list of all plugin paths installed in the
rootPath
- Throws:
IOException
- if an I/O exception occurred reading the directories
-
verifyCompatibility
Verify the given plugin is compatible with the current Elasticsearch installation. -
checkForFailedPluginRemovals
- Throws:
IOException
-
getModuleBundles
Get bundles for plugins installed in the given modules directory.- Throws:
IOException
-
getPluginBundles
Get bundles for plugins installed in the given plugins directory.- Throws:
IOException
-
sortBundles
Return the given bundles, sorted in dependency loading order. This sort is stable, so that if two plugins do not have any interdependency, their relative order from iteration of the provided set will not change.- Throws:
IllegalStateException
- if a dependency cycle is found
-
checkBundleJarHell
-
filterPlugins
-