public class FileBasedCachingEntityCheckerManager extends EntityCheckerManagerImpl
This class is an extension of the EntityCheckerManagerImpl that
caches the results using a persistent file-based cache. Note that the cache
stores the time stamp at which a URI is added to the cache. Cache entries
have a maximal lifetime. If it is exceeded, the entries might be deleted from
the cache.
Internally the result of the checking is stored using the lowest bit of the timestamp.
| Modifier and Type | Field and Description |
|---|---|
protected com.carrotsearch.hppc.ObjectLongOpenHashMap<String> |
cache |
protected File |
cacheFile |
protected File |
tempCacheFile |
| Modifier | Constructor and Description |
|---|---|
protected |
FileBasedCachingEntityCheckerManager(com.carrotsearch.hppc.ObjectLongOpenHashMap<String> cache,
long cacheEntryLifetime,
File cacheFile,
File tempCacheFile) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkUri(String uri) |
static FileBasedCachingEntityCheckerManager |
create(long cacheEntryLifetime,
File cacheFile) |
protected boolean |
performCheck(String uri) |
static com.carrotsearch.hppc.ObjectLongOpenHashMap<String> |
readCacheFile(File cacheFile) |
void |
storeCache() |
checkMarkings, checkMeaning, checkMeanings, generateNewUri, registerEntityCheckerprotected com.carrotsearch.hppc.ObjectLongOpenHashMap<String> cache
protected File cacheFile
protected File tempCacheFile
public static FileBasedCachingEntityCheckerManager create(long cacheEntryLifetime, File cacheFile)
public static com.carrotsearch.hppc.ObjectLongOpenHashMap<String> readCacheFile(File cacheFile)
public boolean checkUri(String uri)
checkUri in class EntityCheckerManagerImplprotected boolean performCheck(String uri)
public void storeCache()
Copyright © 2014–2017. All rights reserved.