public class RawMetadataCache extends FileBasedCache<Long> implements RawDataCache
Modifier and Type | Field and Description |
---|---|
static Pattern |
MATCH_ALL_PATTERN
A regular expression object that matches everything.
|
cacheDir
Constructor and Description |
---|
RawMetadataCache(String prefix,
Pattern urlMatcher,
Pattern mimeMatcher)
Create a new RawMetadataCache.
|
Modifier and Type | Method and Description |
---|---|
protected Long |
cacheData(Long id)
Actually cache data for the given ID.
|
File |
getCacheFile(Long id)
Get the file potentially containing (cached) data for a single job.
|
cache, get, getCacheDir, getIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cache, get
public static final Pattern MATCH_ALL_PATTERN
public RawMetadataCache(String prefix, Pattern urlMatcher, Pattern mimeMatcher)
prefix
- A prefix that will be used to distinguish this cache's files from other caches'. It will be used
for creating a directory, so it must not contain characters not legal in directory names.urlMatcher
- A pattern for matching URLs of the desired entries. If null, a .* pattern will be used.mimeMatcher
- A pattern for matching mime-types of the desired entries. If null, a .* pattern will be used.public File getCacheFile(Long id)
getCacheFile
in class FileBasedCache<Long>
id
- The job to find data for.FileBasedCache.getCacheFile(Object)
protected Long cacheData(Long id)
cacheData
in class FileBasedCache<Long>
id
- A job ID to cache data for.FileBasedCache.cacheData(Object)
Copyright © 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.