Class FunctionCacheManagerImpl
- java.lang.Object
-
- org.apache.pulsar.functions.utils.functioncache.FunctionCacheManagerImpl
-
- All Implemented Interfaces:
java.lang.AutoCloseable,FunctionCacheManager
public class FunctionCacheManagerImpl extends java.lang.Object implements FunctionCacheManager
An implementation ofFunctionCacheManager.
-
-
Constructor Summary
Constructors Constructor Description FunctionCacheManagerImpl(java.lang.ClassLoader rootClassLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the cache manager to release created class loaders.java.lang.ClassLoadergetClassLoader(java.lang.String fid)Returns the function code class loader associated with id.voidregisterFunctionInstance(java.lang.String fid, java.lang.String eid, java.util.List<java.lang.String> requiredJarFiles, java.util.List<java.net.URL> requiredClasspaths)voidregisterFunctionInstanceWithArchive(java.lang.String fid, java.lang.String eid, java.lang.String narArchive, java.lang.String narExtractionDirectory)voidunregisterFunctionInstance(java.lang.String fid, java.lang.String eid)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pulsar.functions.utils.functioncache.FunctionCacheManager
registerFunction, unregisterFunction
-
-
-
-
Method Detail
-
getClassLoader
public java.lang.ClassLoader getClassLoader(java.lang.String fid)
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(java.lang.String fid, java.lang.String eid, java.util.List<java.lang.String> requiredJarFiles, java.util.List<java.net.URL> requiredClasspaths) throws java.io.IOException- Specified by:
registerFunctionInstancein interfaceFunctionCacheManager- Throws:
java.io.IOException
-
registerFunctionInstanceWithArchive
public void registerFunctionInstanceWithArchive(java.lang.String fid, java.lang.String eid, java.lang.String narArchive, java.lang.String narExtractionDirectory) throws java.io.IOException- Specified by:
registerFunctionInstanceWithArchivein interfaceFunctionCacheManager- Throws:
java.io.IOException
-
unregisterFunctionInstance
public void unregisterFunctionInstance(java.lang.String fid, java.lang.String eid)- Specified by:
unregisterFunctionInstancein interfaceFunctionCacheManager
-
close
public void close()
Description copied from interface:FunctionCacheManagerClose the cache manager to release created class loaders.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceFunctionCacheManager
-
-