org.archive.wayback.liveweb
Class RemoteLiveWebCache
java.lang.Object
org.archive.wayback.liveweb.RemoteLiveWebCache
- All Implemented Interfaces:
- LiveWebCache
public class RemoteLiveWebCache
- extends Object
- implements LiveWebCache
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteLiveWebCache
public RemoteLiveWebCache()
getCachedResource
public Resource getCachedResource(URL url,
long maxCacheMS,
boolean bUseOlder)
throws LiveDocumentNotAvailableException,
LiveWebCacheUnavailableException,
IOException
- Description copied from interface:
LiveWebCache
- Fetch a Resource from the live web, or from a cache of the live web.
- Specified by:
getCachedResource in interface LiveWebCache
- Parameters:
url - to fetch from the live web.maxCacheMS - maximum age of resource to return - optionally honoredbUseOlder - if true, return documents older than maxCacheMS if
a more recent copy is not available.
- Returns:
- Resource for url
- Throws:
LiveDocumentNotAvailableException - if the resource cannot be
retrieved from the live web, but all proxying and caching
mechanisms functioned properly
LiveWebCacheUnavailableException - if there was a problem either
accessing the live web, in proxying to the live web, or in
maintaining the cache for the live web
IOException - for the usual reasons
shutdown
public void shutdown()
- Description copied from interface:
LiveWebCache
- closes all resources
- Specified by:
shutdown in interface LiveWebCache
setProxyHostPort
public void setProxyHostPort(String hostPort)
- Parameters:
hostPort - to proxy requests through - ex. "localhost:3128"
setMaxTotalConnections
public void setMaxTotalConnections(int maxTotalConnections)
- Parameters:
maxTotalConnections - the HttpConnectionManagerParams config
setMaxHostConnections
public void setMaxHostConnections(int maxHostConnections)
- Parameters:
maxHostConnections - the HttpConnectionManagerParams config
Copyright © 2005-2011 Internet Archive. All Rights Reserved.