public class FileSystemJarCache extends JarCacheSupport
JarCache
that stores files in a single directory.Constructor and Description |
---|
FileSystemJarCache(File rootDir,
boolean touch) |
Modifier and Type | Method and Description |
---|---|
protected URL |
lookInCache(Channel channel,
long sum1,
long sum2)
Look up the local cache and return URL if found.
|
protected URL |
retrieve(Channel channel,
long sum1,
long sum2)
Retrieve the jar file from the given
JarLoader , store it, then return the URL to that jar. |
getJarLoader, resolve
public final File rootDir
public FileSystemJarCache(File rootDir, boolean touch)
touch
- True to touch the cached jar file that's used. This enables external LRU based cache
eviction at the expense of increased I/O.protected URL lookInCache(Channel channel, long sum1, long sum2) throws IOException, InterruptedException
JarCacheSupport
lookInCache
in class JarCacheSupport
IOException
InterruptedException
protected URL retrieve(Channel channel, long sum1, long sum2) throws IOException, InterruptedException
JarCacheSupport
JarLoader
, store it, then return the URL to that jar.retrieve
in class JarCacheSupport
IOException
InterruptedException
Copyright © 2014. All rights reserved.