public abstract class JarCacheSupport extends JarCache
JarCache.| 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
IOExceptionInterruptedExceptionprotected abstract URL retrieve(Channel channel, long sum1, long sum2) throws IOException, InterruptedException
JarLoader, store it, then return the URL to that jar.IOExceptionInterruptedExceptionpublic Future<URL> resolve(Channel channel, long sum1, long sum2) throws IOException, InterruptedException
JarCacheJarLoader to retrieve it
from the other side.
This method must be concurrency-safe.
resolve in class JarCachechannel - Channel that needs this jar file. Never null.IOExceptionInterruptedExceptionprotected JarLoader getJarLoader(Channel channel) throws InterruptedException
InterruptedExceptionCopyright © 2004-2016. All Rights Reserved.