Interface LibraryCacheManager.ClassLoaderHandle
-
- All Known Subinterfaces:
LibraryCacheManager.ClassLoaderLease
- Enclosing interface:
- LibraryCacheManager
public static interface LibraryCacheManager.ClassLoaderHandle
Handle to retrieve a user code class loader for the associated job.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserCodeClassLoader
getOrResolveClassLoader(Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths)
Gets or resolves the user code class loader for the associated job.
-
-
-
Method Detail
-
getOrResolveClassLoader
UserCodeClassLoader getOrResolveClassLoader(Collection<PermanentBlobKey> requiredJarFiles, Collection<URL> requiredClasspaths) throws IOException
Gets or resolves the user code class loader for the associated job.In order to retrieve the user code class loader the caller has to specify the required jars and class paths. Upon calling this method first for a job, it will make sure that the required jars are present and potentially cache the created user code class loader. Every subsequent call to this method, will ensure that created user code class loader can fulfill the required jar files and class paths.
- Parameters:
requiredJarFiles
- requiredJarFiles the user code class loader needs to loadrequiredClasspaths
- requiredClasspaths the user code class loader needs to be started with- Returns:
- the user code class loader fulfilling the requirements
- Throws:
IOException
- if the required jar files cannot be downloadedIllegalStateException
- if the cached user code class loader does not fulfill the requirements
-
-