dk.netarkivet.archive.indexserver
Interface RawDataCache

All Known Implementing Classes:
CDXDataCache, CrawlLogDataCache, RawMetadataCache

public interface RawDataCache

An interface for getting raw data out of the bitarchives based on job IDs.


Method Summary
 java.lang.Long cache(java.lang.Long id)
          Cache the raw data associated with the given ID as a file, or null if we could not find any such data.
 java.util.Map<java.lang.Long,java.io.File> get(java.util.Set<java.lang.Long> ids)
          Get the raw data files for a set of job IDs.
 

Method Detail

cache

java.lang.Long cache(java.lang.Long id)
Cache the raw data associated with the given ID as a file, or null if we could not find any such data. The data can be found in the file specified by getCacheFile(ID), if this call is successfull.

Parameters:
id - The job ID to look for data for.
Returns:
The data found, or null on failure.

get

java.util.Map<java.lang.Long,java.io.File> get(java.util.Set<java.lang.Long> ids)
Get the raw data files for a set of job IDs. This is commonly a convenience wrapper around cache(Long) and getCacheFile(Long), but may reduce overhead.

Parameters:
ids - Set of job IDs to get data for.
Returns:
Map of ID to file containing data for that ID, or to null if data could not be found.