T
- A comparable instance. Must inherit the java.lang.Comparable interface.public abstract class CombiningMultiFileBasedCache<T extends Comparable<T>> extends MultiFileBasedCache<T>
It is based on an underlying cache of single files. It handles the possibility of some of the files in the underlying cache not being available by telling which files are available rather than by sending an incomplete file.
Modifier and Type | Field and Description |
---|---|
protected FileBasedCache<T> |
rawcache
The raw data cache that this cache gets data from.
|
cacheDir
Modifier | Constructor and Description |
---|---|
protected |
CombiningMultiFileBasedCache(String name,
FileBasedCache<T> rawcache)
Constructor for a CombiningMultiFileBasedCache.
|
Modifier and Type | Method and Description |
---|---|
protected Set<T> |
cacheData(Set<T> ids)
This is called when an appropriate file for the ids in question has not been found.
|
protected abstract void |
combine(Map<T,File> filesFound)
Combine a set of files found in the raw data cache to form our kind of file.
|
protected Map<T,File> |
prepareCombine(Set<T> ids)
Prepare needed data for performing combine().
|
getCacheFile
cache, get, getCacheDir, getIndex
protected FileBasedCache<T extends Comparable<T>> rawcache
protected CombiningMultiFileBasedCache(String name, FileBasedCache<T> rawcache)
name
- The name of the cacherawcache
- The underlying cache of single files.protected Set<T> cacheData(Set<T> ids)
cacheData
in class FileBasedCache<Set<T extends Comparable<T>>>
ids
- The set of identifiers for which we want the corresponding dataprotected Map<T,File> prepareCombine(Set<T> ids)
ids
- Set of job IDs to get ready to combineCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.