Class PluginsLoader

java.lang.Object
org.elasticsearch.plugins.PluginsLoader

public class PluginsLoader extends Object
This class is used to load modules and module layers for each plugin during node initialization prior to enablement of entitlements. This allows entitlements to have all the plugin information they need prior to starting.
  • Method Details

    • loadModulesBundles

      public static Set<PluginBundle> loadModulesBundles(Path modulesDirectory)
      Loads a set of PluginBundles from the modules directory
      Parameters:
      modulesDirectory - The directory modules exist in, or null if modules should not be loaded from the filesystem
    • loadPluginsBundles

      public static Set<PluginBundle> loadPluginsBundles(Path pluginsDirectory)
      Loads a set of PluginBundles from the plugins directory
      Parameters:
      pluginsDirectory - The directory plugins exist in, or null if plugins should not be loaded from the filesystem
    • createPluginsLoader

      public static PluginsLoader createPluginsLoader(Set<PluginBundle> modules, Set<PluginBundle> plugins, Map<String,Set<String>> pluginsWithNativeAccess)
      Constructs a new PluginsLoader
      Parameters:
      modules - The set of module bundles present on the filesystem
      plugins - The set of plugin bundles present on the filesystem
      pluginsWithNativeAccess - A map plugin name -> set of module names for which we want to enable native access
    • createPluginsLoader

      public static PluginsLoader createPluginsLoader(Set<PluginBundle> modules, Set<PluginBundle> plugins, Map<String,Set<String>> pluginsWithNativeAccess, boolean withServerExports)
      Constructs a new PluginsLoader
      Parameters:
      modules - The set of module bundles present on the filesystem
      plugins - The set of plugin bundles present on the filesystem
      pluginsWithNativeAccess - A map plugin name -> set of module names for which we want to enable native access
      withServerExports - true to add server module exports
    • moduleDescriptors

      public List<PluginDescriptor> moduleDescriptors()
    • pluginDescriptors

      public List<PluginDescriptor> pluginDescriptors()
    • pluginLayers

      public Stream<PluginsLoader.PluginLayer> pluginLayers()
    • moduleBundles

      public Set<PluginBundle> moduleBundles()
    • pluginBundles

      public Set<PluginBundle> pluginBundles()