Package com.globalmentor.cache
Class AbstractFileCache<K,Q extends AbstractCache.Query<K>>
java.lang.Object
com.globalmentor.cache.AbstractCache<K,Q,File,AbstractFileCache.FileData>
com.globalmentor.cache.AbstractFileCache<K,Q>
- Type Parameters:
K
- The type of key used to look up data in the cache.Q
- The type of query used to request data from the cache.
public abstract class AbstractFileCache<K,Q extends AbstractCache.Query<K>>
extends AbstractCache<K,Q,File,AbstractFileCache.FileData>
An abstract cache that stores cached values in files.
- Author:
- Garret Wilson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class for storing cached file information.Nested classes/interfaces inherited from class com.globalmentor.cache.AbstractCache
AbstractCache.Query<KK>
Nested classes/interfaces inherited from interface com.globalmentor.cache.Cache
Cache.Data<VV>
-
Field Summary
Fields inherited from class com.globalmentor.cache.AbstractCache
cacheMap, fetchLock
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.globalmentor.cache.AbstractCache
addCacheFetchListener, discard, fetchData, get, get, getData, getData, getExpiration, isCached, isFetchSynchronous, isStaleData, removeCacheFetchListener, retrieveData, setExpiration, setFetchSynchronous, uncache
-
Constructor Details
-
AbstractFileCache
public AbstractFileCache(boolean fetchSynchronous, long expiration) Constructor.- Parameters:
fetchSynchronous
- Whether fetches for new values should occur synchronously.expiration
- The length of time, in milliseconds, to keep cached information.
-