Package hudson.remoting
Class JarCache
- java.lang.Object
-
- hudson.remoting.JarCache
-
- Direct Known Subclasses:
JarCacheSupport
public abstract class JarCache extends Object
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
Fields Modifier and Type Field Description static File
DEFAULT_NOWS_JAR_CACHE_LOCATION
Default JAR cache location for disabled workspace Manager.
-
Constructor Summary
Constructors Constructor Description JarCache()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract CompletableFuture<URL>
resolve(Channel channel, long sum1, long sum2)
Looks up the jar in cache, and if not found, useJarLoader
to retrieve it from the other side.
-
-
-
Field Detail
-
DEFAULT_NOWS_JAR_CACHE_LOCATION
public static final File DEFAULT_NOWS_JAR_CACHE_LOCATION
Default JAR cache location for disabled workspace Manager.
-
-
Method Detail
-
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
-
-