接口 FunctionCacheManager
- 所有超级接口:
AutoCloseable
- 所有已知实现类:
FunctionCacheManagerImpl
A cache manager for caching function code and its dependencies.
-
方法概要
修饰符和类型方法说明voidclose()Close the cache manager to release created class loaders.getClassLoader(String fid) Returns the function code class loader associated with id.default voidRegisters a function with its required jar files and classpaths.voidregisterFunctionInstance(String fid, String eid, List<String> requiredJarFiles, List<URL> requiredClasspaths) voidregisterFunctionInstanceWithArchive(String fid, String eid, String narArchive, String narExtractionDirectory) default voidunregisterFunction(String fid) Unregisters a job from the function cache manager.voidunregisterFunctionInstance(String fid, String eid)
-
方法详细资料
-
getClassLoader
Returns the function code class loader associated with id.- 参数:
fid- function id- 返回:
- class loader which can load the function code.
-
registerFunction
default void registerFunction(String fid, List<String> requiredJarFiles, List<URL> requiredClasspaths) throws IOException Registers a function with its required jar files and classpaths.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.- 抛出:
IOException
-
registerFunctionInstance
void registerFunctionInstance(String fid, String eid, List<String> requiredJarFiles, List<URL> requiredClasspaths) throws IOException - 抛出:
IOException
-
registerFunctionInstanceWithArchive
void registerFunctionInstanceWithArchive(String fid, String eid, String narArchive, String narExtractionDirectory) throws IOException - 抛出:
IOException
-
unregisterFunction
Unregisters a job from the function cache manager.- 参数:
fid- function id
-
unregisterFunctionInstance
-
close
void close()Close the cache manager to release created class loaders.- 指定者:
close在接口中AutoCloseable
-