public class DefaultCachedExternalResourceIndex<K extends Serializable> extends Object implements CachedExternalResourceIndex<K>
| Constructor and Description |
|---|
DefaultCachedExternalResourceIndex(File persistentCacheFile,
Class<K> keyType,
TimeProvider timeProvider,
CacheLockingManager cacheLockingManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(K key)
Remove the entry for the given key if it exists.
|
CachedExternalResource |
lookup(K key)
Lookup a cached resolution.
|
void |
store(K key,
File artifactFile,
ExternalResourceMetaData externalResourceMetaData)
Adds a resolution to the index.
|
void |
storeMissing(K key)
Record that the artifact with the given key was missing.
|
public DefaultCachedExternalResourceIndex(File persistentCacheFile, Class<K> keyType, TimeProvider timeProvider, CacheLockingManager cacheLockingManager)
public void store(K key, File artifactFile, ExternalResourceMetaData externalResourceMetaData)
CachedExternalResourceIndexstore in interface CachedExternalResourceIndex<K extends Serializable>key - The key to cache this resolution under in the index. Cannot be null.artifactFile - The artifact file in the persistent file store. Cannot be nullexternalResourceMetaData - Information about this resource at its sourceCachedExternalResourceIndex.storeMissing(Object)public void storeMissing(K key)
CachedExternalResourceIndexstoreMissing in interface CachedExternalResourceIndex<K extends Serializable>key - The key to cache this resolution under in the index.public CachedExternalResource lookup(K key)
CachedExternalResourceIndexCachedExternalResource.getCachedFile() is guaranteed
to exist at the time that the entry is returned from this method.lookup in interface CachedExternalResourceIndex<K extends Serializable>key - The key to search the index forpublic void clear(K key)
CachedExternalResourceIndexclear in interface CachedExternalResourceIndex<K extends Serializable>key - The key of the item to remove.Copyright © 2013. All rights reserved