Package de.umass.lastfm.cache
Class MemoryCache
java.lang.Object
de.umass.lastfm.cache.Cache
de.umass.lastfm.cache.MemoryCache
This class is just for testing. You probably don't want to use it in production.
- Author:
- Janni Kovacs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cache by effectively removing all cached data.booleanChecks if the cache contains an entry with the given name.booleanChecks if the specified entry is expired.Loads the specified entry from the cache and returns an InputStream to be read from.voidRemoves the specified entry from the cache if available.voidstore(String cacheEntryName, InputStream inputStream, long expirationDate) Stores a request in the cache.Methods inherited from class de.umass.lastfm.cache.Cache
createCacheEntryName, getExpirationPolicy, setExpirationPolicy, setHashCacheEntryNames
-
Constructor Details
-
MemoryCache
public MemoryCache()
-
-
Method Details
-
contains
Description copied from class:CacheChecks if the cache contains an entry with the given name. -
load
Description copied from class:CacheLoads the specified entry from the cache and returns an InputStream to be read from. Returnsnullif the cache does not contain the specified cacheEntryName. -
remove
Description copied from class:CacheRemoves the specified entry from the cache if available. Does nothing if no such entry is available. -
store
Description copied from class:CacheStores a request in the cache. -
isExpired
Description copied from class:CacheChecks if the specified entry is expired. -
clear
public void clear()Description copied from class:CacheClears the cache by effectively removing all cached data.
-