Class FunctionCacheManagerImpl
java.lang.Object
org.apache.pulsar.functions.utils.functioncache.FunctionCacheManagerImpl
- All Implemented Interfaces:
AutoCloseable,FunctionCacheManager
An implementation of
FunctionCacheManager.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the cache manager to release created class loaders.getClassLoader(String fid) Returns the function code class loader associated with id.voidregisterFunctionInstance(String fid, String eid, List<String> requiredJarFiles, List<URL> requiredClasspaths) voidregisterFunctionInstanceWithArchive(String fid, String eid, String narArchive, String narExtractionDirectory) voidunregisterFunctionInstance(String fid, String eid) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.functions.utils.functioncache.FunctionCacheManager
registerFunction, unregisterFunction
-
Constructor Details
-
FunctionCacheManagerImpl
-
-
Method Details
-
getClassLoader
Description copied from interface:FunctionCacheManagerReturns the function code class loader associated with id.- Specified by:
getClassLoaderin interfaceFunctionCacheManager- Parameters:
fid- function id- Returns:
- class loader which can load the function code.
-
registerFunctionInstance
public void registerFunctionInstance(String fid, String eid, List<String> requiredJarFiles, List<URL> requiredClasspaths) throws IOException - Specified by:
registerFunctionInstancein interfaceFunctionCacheManager- Throws:
IOException
-
registerFunctionInstanceWithArchive
public void registerFunctionInstanceWithArchive(String fid, String eid, String narArchive, String narExtractionDirectory) throws IOException - Specified by:
registerFunctionInstanceWithArchivein interfaceFunctionCacheManager- Throws:
IOException
-
unregisterFunctionInstance
- Specified by:
unregisterFunctionInstancein interfaceFunctionCacheManager
-
close
public void close()Description copied from interface:FunctionCacheManagerClose the cache manager to release created class loaders.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceFunctionCacheManager
-