Package hudson.remoting
Class JarCache
java.lang.Object
hudson.remoting.JarCache
- Direct Known Subclasses:
JarCacheSupport
Jar file cache.
The remoting library supports local jar file caching for the efficiency in remote class loading. The cache stores jar files sent by the other side, and identifies jars with MD5 checksums that uniquely identifies its content. This allows the cache to be reused by future channel sessions or other concurrent channel sessions.
- Since:
- 2.24
- Author:
- Kohsuke Kawaguchi
-
Field Summary
Modifier and TypeFieldDescriptionstatic final File
Default JAR cache location for disabled workspace Manager. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract CompletableFuture<URL>
Looks up the jar in cache, and if not found, useJarLoader
to retrieve it from the other side.
-
Field Details
-
DEFAULT_NOWS_JAR_CACHE_LOCATION
Default JAR cache location for disabled workspace Manager.
-
-
Constructor Details
-
JarCache
public JarCache()
-
-
Method Details
-
resolve
@NonNull public abstract CompletableFuture<URL> resolve(@NonNull Channel channel, long sum1, long sum2) throws IOException, InterruptedException Looks up the jar in cache, and if not found, useJarLoader
to retrieve it from the other side.This method must be concurrency-safe.
- Parameters:
channel
- Channel that needs this jar file.- Returns:
- URL of the jar file.
- Throws:
IOException
InterruptedException
-