Interface LibraryCacheManager.ClassLoaderHandle

    • 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 load
        requiredClasspaths - 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 downloaded
        IllegalStateException - if the cached user code class loader does not fulfill the requirements