dk.netarkivet.archive.indexserver
Class CDXIndexCache
java.lang.Object
dk.netarkivet.archive.indexserver.FileBasedCache<java.util.Set<T>>
dk.netarkivet.archive.indexserver.MultiFileBasedCache<T>
dk.netarkivet.archive.indexserver.CombiningMultiFileBasedCache<java.lang.Long>
dk.netarkivet.archive.indexserver.CDXIndexCache
- All Implemented Interfaces:
- JobIndexCache
public class CDXIndexCache
- extends CombiningMultiFileBasedCache<java.lang.Long>
- implements JobIndexCache
A cache that serves CDX index files for job IDs.
Notice that since data for some IDs may not be available, the actual
cached file might not correspond in its content to what was asked for.
For instance, if asking for data for IDs 2, 3, and 4, and 3 fails, a
cached file for IDs 2 and 4 will be returned. There is currently no
way to tell if you got everything you asked for.
This cache uses the Unix sort(1) command as an external process call,
as that one is optimized for handling large, disk-based sorts.
Constructor Summary |
CDXIndexCache()
Creates a new cache for CDX index files. |
Method Summary |
protected void |
combine(java.util.Map<java.lang.Long,java.io.File> filesFound)
Combine parts of an index into one big index. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CDXIndexCache
public CDXIndexCache()
- Creates a new cache for CDX index files.
combine
protected void combine(java.util.Map<java.lang.Long,java.io.File> filesFound)
- Combine parts of an index into one big index.
- Specified by:
combine
in class CombiningMultiFileBasedCache<java.lang.Long>
- Parameters:
filesFound
- A map of IDs and the files caching their content.