public interface FunctionCacheManager extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the cache manager to release created class loaders.
|
ClassLoader |
getClassLoader(String fid)
Returns the function code class loader associated with id.
|
default void |
registerFunction(String fid,
List<String> requiredJarFiles,
List<URL> requiredClasspaths)
Registers a function with its required jar files and classpaths.
|
void |
registerFunctionInstance(String fid,
String eid,
List<String> requiredJarFiles,
List<URL> requiredClasspaths) |
void |
registerFunctionInstanceWithArchive(String fid,
String eid,
String narArchive,
String narExtractionDirectory) |
default void |
unregisterFunction(String fid)
Unregisters a job from the function cache manager.
|
void |
unregisterFunctionInstance(String fid,
String eid) |
ClassLoader getClassLoader(String fid)
fid - function iddefault void registerFunction(String fid, List<String> requiredJarFiles, List<URL> requiredClasspaths) throws IOException
The jar files are identified by their blob keys and downloaded for
use by a ClassLoader.
fid - function idrequiredJarFiles - collection of blob keys identifying the required jar files.requiredClasspaths - collection of classpaths that are added to the function code class loader.IOExceptionvoid registerFunctionInstance(String fid, String eid, List<String> requiredJarFiles, List<URL> requiredClasspaths) throws IOException
IOExceptionvoid registerFunctionInstanceWithArchive(String fid, String eid, String narArchive, String narExtractionDirectory) throws IOException
IOExceptiondefault void unregisterFunction(String fid)
fid - function idvoid close()
close in interface AutoCloseableCopyright © 2017–2022 Apache Software Foundation. All rights reserved.