Interface LibraryCacheManager
-
- All Known Implementing Classes:
BlobLibraryCacheManager
public interface LibraryCacheManager
The 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.ClassLoaderLease
for a givenJobID
. At first, theLibraryCacheManager.ClassLoaderLease
is 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.ClassLoaderLease
becomes invalid once it gets released.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LibraryCacheManager.ClassLoaderHandle
Handle to retrieve a user code class loader for the associated job.static interface
LibraryCacheManager.ClassLoaderLease
Lease 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.ClassLoaderLease
registerClassLoaderLease(JobID jobId)
Registers a new class loader lease for the given jobId.void
shutdown()
Shuts the library cache manager down.
-
-
-
Method Detail
-
registerClassLoaderLease
LibraryCacheManager.ClassLoaderLease registerClassLoaderLease(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.ClassLoaderLease
and release all registered user code class loaders.
-
-