public abstract class JarCacheSupport extends JarCache
JarCache
.DEFAULT_NOWS_JAR_CACHE_LOCATION
Constructor and Description |
---|
JarCacheSupport() |
Modifier and Type | Method and Description |
---|---|
protected JarLoader |
getJarLoader(Channel channel) |
protected abstract URL |
lookInCache(Channel channel,
long sum1,
long sum2)
Look up the local cache and return URL if found.
|
Future<URL> |
resolve(Channel channel,
long sum1,
long sum2)
Looks up the jar in cache, and if not found, use
JarLoader to retrieve it
from the other side. |
protected abstract 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. |
protected abstract URL lookInCache(Channel channel, long sum1, long sum2) throws IOException, InterruptedException
IOException
InterruptedException
protected abstract URL retrieve(Channel channel, long sum1, long sum2) throws IOException, InterruptedException
JarLoader
, store it, then return the URL to that jar.IOException
InterruptedException
@NonNull public Future<URL> resolve(@NonNull Channel channel, long sum1, long sum2) throws IOException, InterruptedException
JarCache
JarLoader
to retrieve it
from the other side.
This method must be concurrency-safe.
resolve
in class JarCache
channel
- Channel that needs this jar file.IOException
InterruptedException
protected JarLoader getJarLoader(Channel channel) throws InterruptedException
InterruptedException
Copyright © 2004–2022. All rights reserved.