dk.netarkivet.viewerproxy
Class LocalCDXCache

java.lang.Object
  extended by dk.netarkivet.viewerproxy.LocalCDXCache
All Implemented Interfaces:
JobIndexCache

Deprecated. Use JobIndexCache-mechanism instead

public class LocalCDXCache
extends java.lang.Object
implements JobIndexCache

This class handles retrieval and merging of index.cdx files for sets of jobs. It has been designed to allow multiple instances to use the same cache dir without interfering with each other, even if they run in separate VMs.


Constructor Summary
LocalCDXCache(ViewerArcRepositoryClient arcRepos)
          Deprecated. Construct a new CDXCache object.
 
Method Summary
 Index<java.util.Set<java.lang.Long>> getIndex(java.util.Set<java.lang.Long> jobIDs)
          Deprecated. Get a job index for the given list of IDs.
 void requestIndex(java.util.Set<java.lang.Long> jobSet, java.lang.Long harvestId)
          Deprecated. Request an index from the indexserver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalCDXCache

public LocalCDXCache(ViewerArcRepositoryClient arcRepos)
Deprecated. 
Construct a new CDXCache object.

Parameters:
arcRepos - Viewer ArcRepositoryClient
Method Detail

getIndex

public Index<java.util.Set<java.lang.Long>> getIndex(java.util.Set<java.lang.Long> jobIDs)
Deprecated. 
Get a job index for the given list of IDs. The resulting file contains a sorted list of the CDX lines for the jobs in question. This method is safe for asynchronous calling. This method may use a cached version of the file.

Specified by:
getIndex in interface JobIndexCache
Parameters:
jobIDs - List of job IDs to generate index for.
Returns:
A file containing an index, and always the full set.

requestIndex

public void requestIndex(java.util.Set<java.lang.Long> jobSet,
                         java.lang.Long harvestId)
Deprecated. 
Description copied from interface: JobIndexCache
Request an index from the indexserver. Prepare the indx but don't give it to me.

Specified by:
requestIndex in interface JobIndexCache