Class NativeLibraryProvider
java.lang.Object
org.elasticsearch.nativeaccess.lib.NativeLibraryProvider
- Direct Known Subclasses:
JdkNativeLibraryProvider
Allows loading native library mappings.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NativeLibraryProvider
(String name, Map<Class<? extends NativeLibrary>, Supplier<NativeLibrary>> libraries) -
Method Summary
Modifier and TypeMethodDescription<T extends NativeLibrary>
TgetLibrary
(Class<T> cls) Construct an instance of the given library class.getName()
Returns a human-understandable name for this providerstatic NativeLibraryProvider
instance()
Get the one and only instance ofNativeLibraryProvider
that is specific to the running JDK version.
-
Constructor Details
-
NativeLibraryProvider
protected NativeLibraryProvider(String name, Map<Class<? extends NativeLibrary>, Supplier<NativeLibrary>> libraries)
-
-
Method Details
-
instance
Get the one and only instance ofNativeLibraryProvider
that is specific to the running JDK version. -
getName
Returns a human-understandable name for this provider -
getLibrary
Construct an instance of the given library class.- Parameters:
cls
- The library class to create- Returns:
- An instance of the class
-