org.archive.wayback.resourcestore
Class SimpleResourceStore
java.lang.Object
org.archive.wayback.resourcestore.SimpleResourceStore
- All Implemented Interfaces:
- ResourceStore
public class SimpleResourceStore
- extends Object
- implements ResourceStore
Implements ResourceStore where ARC/WARCs are accessed via a local file or an
HTTP 1.1 range request. All files are assumed to be "rooted" at a particular
HTTP URL, or within a single local directory. The HTTP version may imply a
file reverse-proxy to connect through to actual HTTP ARC/WARC locations.
- Version:
- $Date: 2010-10-21 07:37:52 +0700 (Thu, 21 Oct 2010) $, $Revision: 3288 $
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleResourceStore
public SimpleResourceStore()
retrieveResource
public Resource retrieveResource(CaptureSearchResult result)
throws ResourceNotAvailableException
- Description copied from interface:
ResourceStore
- Transform a CaptureSearchResult into a Resource
- Specified by:
retrieveResource in interface ResourceStore
- Parameters:
result - CaptureSearchResult which should be retrieved
- Returns:
- Resource object retrieved for the SearchResult
- Throws:
ResourceNotAvailableException - if the resource was unavailable
(down host, corrupted files, etc)
getPrefix
public String getPrefix()
- Returns:
- the prefix
setPrefix
public void setPrefix(String prefix)
- Parameters:
prefix - the prefix to set
shutdown
public void shutdown()
throws IOException
- Description copied from interface:
ResourceStore
- Release any resources used by this ResourceIndex cleanly
- Specified by:
shutdown in interface ResourceStore
- Throws:
IOException - for usual causes
getRetries
public int getRetries()
- Returns:
- the number of attempts to fetch resources with an HTTP 502
failure.
setRetries
public void setRetries(int retries)
- Parameters:
retries - the number of attempts to fetch resources with an HTTP 502
failure.
Copyright © 2005-2011 Internet Archive. All Rights Reserved.