Class ProviderLocator<T>

java.lang.Object
org.elasticsearch.core.internal.provider.ProviderLocator<T>
Type Parameters:
T - the provider type
All Implemented Interfaces:
Supplier<T>

public final class ProviderLocator<T> extends Object implements Supplier<T>
A provider locator that finds the implementation of the specified provider.

A provider locator is given a small recipe, in the form of constructor arguments, which it uses to find the required provider implementation.

When run as a module, the locator will load the provider implementation as a module, in its own module layer. Otherwise, the provider implementation will be loaded as a non-module.

  • Constructor Details

    • ProviderLocator

      public ProviderLocator(String providerName, Class<T> providerType, String providerModuleName, Set<String> missingModules)
  • Method Details

    • get

      public T get()
      Specified by:
      get in interface Supplier<T>