dk.netarkivet.common.distribute.indexserver
Interface JobIndexCache

All Known Implementing Classes:
CDXIndexCache, CrawlLogIndexCache, DedupCrawlLogIndexCache, FullCrawlLogIndexCache, IndexRequestClient, LocalCDXCache, TrivialJobIndexCache

public interface JobIndexCache

An interface to a cache of data for jobs.


Method Summary
 Index<java.util.Set<java.lang.Long>> getIndex(java.util.Set<java.lang.Long> jobIDs)
          Get an index for the given list of job IDs.
 void requestIndex(java.util.Set<java.lang.Long> jobSet, java.lang.Long harvestId)
          Request an index from the indexserver.
 

Method Detail

getIndex

Index<java.util.Set<java.lang.Long>> getIndex(java.util.Set<java.lang.Long> jobIDs)
Get an index for the given list of job IDs. The resulting file contains a suitably sorted list. This method should always be safe for asynchronous calling. This method may use a cached version of the file.

Parameters:
jobIDs - Set of job IDs to generate index for.
Returns:
An index, consisting of a file and the set this is an index for. This file must not be modified or deleted, since it is part of the cache of data.

requestIndex

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

Parameters:
jobSet -
harvestId -