Interface LibraryCacheManager
-
- All Known Implementing Classes:
BlobLibraryCacheManager
public interface LibraryCacheManagerThe LibraryCacheManager is responsible for creating and managing the user code class loaders.In order to obtain a user code class loader, one first needs to obtain a
LibraryCacheManager.ClassLoaderLeasefor a givenJobID. At first, theLibraryCacheManager.ClassLoaderLeaseis unresolved. In order to obtain the user class loader one needs to resolve it by specifying the required jar files and class paths. The user code class loader for a job is valid as long as there exists a validLibraryCacheManager.ClassLoaderLease. ALibraryCacheManager.ClassLoaderLeasebecomes invalid once it gets released.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLibraryCacheManager.ClassLoaderHandleHandle to retrieve a user code class loader for the associated job.static interfaceLibraryCacheManager.ClassLoaderLeaseLease which allows to signal when the user code class loader is no longer needed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LibraryCacheManager.ClassLoaderLeaseregisterClassLoaderLease(org.apache.flink.api.common.JobID jobId)Registers a new class loader lease for the given jobId.voidshutdown()Shuts the library cache manager down.
-
-
-
Method Detail
-
registerClassLoaderLease
LibraryCacheManager.ClassLoaderLease registerClassLoaderLease(org.apache.flink.api.common.JobID jobId)
Registers a new class loader lease for the given jobId. The user code class loader for this job will be valid as long as there exists a valid lease for this job.- Parameters:
jobId- jobId for which to register a new class loader lease- Returns:
- a new class loader lease for the given job
-
shutdown
void shutdown()
Shuts the library cache manager down. Thereby it will close all openLibraryCacheManager.ClassLoaderLeaseand release all registered user code class loaders.
-
-